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
Currently, the ProjectionType makes it easy to list explicitly defined relationships. However, there is no straightforward way to resolve implicit relationships between entities.
Consider the following entity definitions:
CartItem
The CartItem entity explicitly defines a relationship with Product.
However, CartItem also has an implicit relationship with Order, but this is not directly defined in its relationships.
There should be an easy way to resolve such implicit relationships.
Proposal(s):
Either add implicit relationships in the ProjectionType.Relationships, with a flag to distinguish the explicit and implicit ones.
Or add an "ImplicitRelationships" property to ProjectionType.
Alternative(s):
As an alternative, we can query the API of ProjectionTypes to find projection types where the relationships have a target that corresponds to the entity in question. For example, in the case of CartItem, we can look for projection types where a relationship's target is CartItem. This allows us to infer implicit relationships without them being explicitly defined within the entity itself.
Additional info:
No response
Community Notes
Please vote by adding a 👍 reaction to the feature to help us prioritize.
If you are interested to work on this feature, please leave a comment.
The text was updated successfully, but these errors were encountered:
What would you like to be added?
Currently, the
ProjectionType
makes it easy to list explicitly defined relationships. However, there is no straightforward way to resolve implicit relationships between entities.Consider the following entity definitions:
CartItem
Order
The
CartItem
entity explicitly defines a relationship withProduct
.However,
CartItem
also has an implicit relationship withOrder
, but this is not directly defined in its relationships.There should be an easy way to resolve such implicit relationships.
Proposal(s):
Either add implicit relationships in the
ProjectionType.Relationships
, with a flag to distinguish the explicit and implicit ones.Or add an "ImplicitRelationships" property to
ProjectionType
.Alternative(s):
As an alternative, we can query the API of
ProjectionTypes
to find projection types where the relationships have a target that corresponds to the entity in question. For example, in the case ofCartItem
, we can look for projection types where a relationship'starget
isCartItem
. This allows us to infer implicit relationships without them being explicitly defined within the entity itself.Additional info:
No response
Community Notes
The text was updated successfully, but these errors were encountered: