7 Replies Latest reply on Feb 27, 2015 10:50 AM by Barry LaFond

    problem defining primary key on view model entity

    Greg MacKinnon Newbie

      I have a source relational model where some entities I want to expose via OData REST don't have a primary key.  As you know, teiid OData support will not expose a given entity via REST unless the entity has either a primary key or unique constraint defined.


      I also have a view model defined where i transform some entity names to make them more REST API resource model "friendly".  This view model is also where I want to define some primary keys for entities in the source model that don't have primary keys.


      I can define a primary key set on one given entity in my view model, but when I try to define a primary key set on a second entity in the view model the columns that are available for selection are those related to the first given entity I defined a primary key for. It would seem that one should only be able to select columns that are associated with the entity you're working with.


      this occurs on teiid desinger 8.6, teiid 8.7, on windows.


      It's entirely possible that I am going about defining the keys improperly. Is there a "best practice" as to how to go about defining the primary keys for a view model entity?


      Thanks and Best Regards,