By Scott - 8/9/2006
I have a BO that is based on a view. The view has no column marked as the primary key so the BO mapper does not build the key into the designer file. I am using this view to locate records using the BrowseDialog, becuase there is no primary key field, when the data is returned the BO currentrow is set to the first row in the datatable. If I manually add the code to the designer file so that the BO knows what the key field of the view is, everything works fine. Do you have an suggestions on how I can work with this situation?Thanks Scott
|
By StrataFrame Team - 8/10/2006
You can add indexes to views, but not primary keys. So, if you pull the view directly from SQL Server, the business object is not going to see the primary key. The only way to get the BOMapper to see the primary key on a view is to use the Database Deployment Toolkit and create a table with the same structure as the view. You can then define the primary key on the "faux" table and map your business object to it. Then when you build the partial from the DDT information, you will be able to see the primary key.
|
By Scott - 8/10/2006
Thats kind of what I thought. Thanks
|
|