You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicclassClientGrantType{publicvirtualClientGrantTypeIdId{get;set;}//primary key on the entityprotectedClientGrantType(){}publicClientGrantType(ClientGrantTypeIdid){Id=id;}}
ClientGrantTypeId is owned type of ClientGrantType entity and I want to set ClientGrantTypeId type as Id of ClientGrantType entity.
I expect that ClientGrantType entity has a composite PK in the database (as ClientId, GrantType).
As I see it's not possible to define such a primary key as owned type.
Is there a way of it?
Is it a good practice and do you consider to allow such a definition in next releases?
The text was updated successfully, but these errors were encountered:
We discussed this in triage and decided that this does not fit the conceptual model for owned types, since the identity of the owned type is handled by the parent type, but it in this case the child type has the identity properties. However, it could be supported as part of #9906, and that seems like a much better fit conceptually, so closing this issue and adding a note to consider when implementing #9906.
Hi,
Suppose that we have an entity like that:
And
ClientGrantTypeId
is defined as:ClientGrantTypeId
is owned type ofClientGrantType
entity and I want to setClientGrantTypeId
type as Id ofClientGrantType
entity.I expect that
ClientGrantType
entity has a composite PK in the database (as ClientId, GrantType).As I see it's not possible to define such a primary key as owned type.
The text was updated successfully, but these errors were encountered: