Anthony wrote:
Otis wrote:
Map entity on view, specify which field(s) are the identifying fields in the entity, then define the relationship. Views don't have PKs so you have to define the PK in the entity mapped onto it.
When i try to edit the vw in the model..the primary key is not listed! I can see the key in the catalof explore but whne i reverse engineer..the pk field doesn't come across
View meta data doesn't have information about pk fields, so I doubt the view in the catalog explorer has a PK defined. Aren't you looking at a table instead? E.g. the table the view is based on?
Regardless, with views, you should specify the identifying fields on the entity in the entity editor, like I wrote in my previous post, as views don't have PKs so they're obviously not used for the identifying fields in an entity (as there IS no PK information available on a view).
And before you might think I'm wrong, there's no code in the driver either to obtain the information for PK fields for views. See for yourself in the driver source code.