StrataFrame Forum

Views in BOs

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

By Peter Jones - 2/8/2007

Hi,

I have a set of tables defined using DDT and one view. When I use the DDT as the data source for a business object all I see are the tables and the view is missing. Can you just confirm that this is incorrect and I should see views as well as tables. I presume I've done something wrong but, before I go chasing around, I would just like confirmation that DDT views are visible to business objects.

Cheers, Peter

By Larry Caylor - 2/9/2007

Peter,

 

Views defined in DDT are not valid data sources for object mapper. You can use DDT to deploy the view to the database then use a SQL data source in object mapper to map your BO to the view. See the following link for more information.

 

http://forum.strataframe.net/Topic5732-6-1.aspx?Highlight=view

 

-Larry

By StrataFrame Team - 2/9/2007

Larry is right... if you want to use a view as the structure source for a business object, you have to map to the actual view within SQL Server... the BOMapper and DDT do not have the same sophisticated view syntax parsing that SQL Server uses, so you have to create the view first so we can pull the structure after SQL Server has parsed it.
By Peter Jones - 2/9/2007

Hi,

Actually I did read Larry's post before I posted my query but obviously not close enough.

Is there any benefit in using the DDT as the data source for a BO. Obviously before any code can be executed the DDT definition has to have been propergated into the database anyway.

Cheers, Peter

By StrataFrame Team - 2/9/2007

The benefits you get are speed in a really big project... reading the SQL Server meta-data can be slower if you've got a project with 200+ business objects in it (but only by 30 seconds or so).  Other than that, the only difference is that the BOMapper can read the descriptions from the DDT's meta-data for each property's doc comments (that show up in Intellisense); if you use SQL Server, the <summary> gets set to the name of the property, which isn't very descriptive.