So here's what I'm trying to do: I'm building a non-persistent object tree, of which I want to give the main object to a widget. In that widget, I want to get the object children, their children, etc. However, I run into a problem with the MxObject.fetch quite soon, the first object doesn't seem to know his children. Is there a clever way to work around this?
asked
Remco Snijders
2 answers
1
You could probably reverse the association and make it n-n. That way the main object is the owner of the association while being able to have multiple children
answered
Pieter Scherphof
0
Hey Remco,
You can also change the association Settings in the Entity. By default, the 1-N(many) associations have "default" reference, meaning that the parent oblect can refere the child object. You can chage the reference to "both", so that the child objects can refer its parent object as well.