Model Relationship Resource #75
SergioDelRioT4Bi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At the Developer Conference on February 28, 2023, we made a decision to not put any navigation logic into the new Fields resource, and instead, create a new resource that has this data in it.
I would like to start a discussion on this and see if we can get a consensus on this.
I feel this could be done by either one slightly more complicated resource or two resources but the benefit of two resources seems very limited to me so I would suggest just one resource as follows:
Single ModelRelaionships Resource:
This is the simple case with a redundant field in it called (CollectionYN).
We can represent a single-part-key relationship easily with one row.
We can represent a multi-part-key relationship easily with multiple rows.
CollectionYN true means it's a 1:M relationship that is being defined, false means it's a1:1 relationship that is being defined.
For multi-part-keys, we just need to have a consistent setting of the CollectionYN flag across all the records.
The only benefit of two resources that I can see is to have the CollectionYN flag in a parent record and then the field relationships in separate sub-table.
Optionally we can skip ParentModelKey and ChildModelKey as the ParentFieldKey and ChildModelKey would give enough information anyway.
We might want to use Source and Dest instead of Parent and Child as this might be more clear when going from Property to Member as being very different than going from Member to Property which is parent/child whereas Property to Member is not parent/child strictly speaking.
Beta Was this translation helpful? Give feedback.
All reactions