1 Reply Latest reply on Nov 7, 2013 10:36 AM by Philip Stoyanov-Oracle

    SDDM - 'View' Properties - Missing Constraint option


      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


        (my_column_1, my_column_2)



      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?