I have a lot of entities which share a single parent entity (through parent property), this allows me to hide and show them all at once (for example). I have multiple such parent entities
If I remove the parentEntity from the entity collection, the children still remains there. What I want is to remove them also.
Currently, before removing the desired parentEntity, I iterate over it’s _children array and remove each child one by one. I don’t like it
because ‘_children’ is private.
Can you suggest a correct approach?