StrataFrame Forum

BusinessObject Mapper - Default Values/Stored Procedures

http://forum.strataframe.net/Topic722.aspx

By Kari Paukku - 3/24/2006

Hi,

New to to SF started to create the first BusinessObject and it raised a couple of questions:

- The default value for "NULL Value" seems to be "Do Not Allow Nulls". Can this be changed or even better - made to be retrieved from the database (in my case Oracle).

- Can a business object be build on a stored procedure or perhaps without having any direct link to a object in the database

TIA,

Kari

By Trent L. Taylor - 3/24/2006

Kari,

As of right now, the default values for the NULL options cannot be changed.  However, we have talked about adding a preference that would allow you to choose which default option to use.  This is a good idea and should probably be implemented.  But for now the only way to change this is manually.

As for your stored procedures question. You cannot pull the schema from the stored procedure directly, but you can fill the business object with a stored procedure.  There is, however, a solution to what you are trying to accomplish.  This is where the Database Deployment Toolkit (DDT) comes in very handy.  You can create a profile in the DDT that will match the schema when pulled from the stored procedure.  To strong-type the business object, simply map it to the DDT table and then use your stored procedure to fill the BO.  This is the best of both worlds.  We use this same technique when we want to map a business object to an XML file.

The business object does not care where the data comes from, nor does it have to pull its structure in the BO Mapper from the same place that will be populating it. 

Let me know if this doesn't make any sense. Hehe