Inheritance behavior in many-to-many relation fields #16889
gresa-neziri
started this conversation in
General
Replies: 1 comment
-
@gresa-neziri What you would like to achieve here is not possible. Inheritance is always based on the full data of a field. So when you change the relations in a child object the inheritance is broken. Its not possible to append additional relations but still inherit the ones from the parent. To achieve something similar you could maybe think about using multiple attributes for the different levels in your hierarchy and some custom code which merges the relations of all these attributes when reading it (for example in the frontend). But for sure it depends on the use case if this is a reasonable approach. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I will explain the inheritance behavior in many to many relation fields using an example from the current situation:
Let's have a Parent and a Child dataobject of the type "Product" with inheritance enabled. In this dataobject, there is a field "files" (many-to-many relation).
I have a question about "breaking inheritance", "fileX" should'd be saved in the Child object but it is even that is just inherited. Is that intended to be so?
Is there a possibility to improve this, as example to not break the inheritance but show the inherited files there as well (grayed out) or similar?
In our project, the requirement is to inherit everything from the parent but to have the possibilities to add other files or objects in many to many field but to always have the information what is inherited and what is not!
Beta Was this translation helpful? Give feedback.
All reactions