Skip to Main Content

SQL Developer Data Modeler

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SDDM - 'View' Properties - Missing Constraint option

user5239736Nov 6 2013 — edited Nov 7 2013

In SDDM, it appears that you cannot alter a 'view' to add a primary key constraint.

ALTER VIEW my_view_name

ADD CONSTRAINT my_view_PK

  PRIMARY KEY

  (my_column_1, my_column_2)

  DISABLE;

I have an Oracle database that needs primary key constraints for them to be included in the Visual Studio / Entity Framework .net application and when the developers generate the edmx file these error messages are displayed:

warning 6013: The table/view 'my_view_name' does not have a primary key defined and no valid primary key could be inferred. This table/view has been excluded. To use the entity, you will need to review your schema, add the correct keys, and uncomment it.

I know Microsoft/Entity Frameworks/Oracle should all play nice but bottom line: if I can create a constraint in sql I should be able to do it in SDDM.  When I reverse engineer the model from Oracle into SDDM the constraint is not there as part of the view properties.  I suppose I could add it to View Properties|Scripts|After Create but that seems like another hack to me.

Anyone have an elegant solution in SDDM or explain why that is not available in the Relational Model?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 5 2013
Added on Nov 6 2013
1 comment
317 views