Hi guys I have a domain model, that includes multiple levels of hierarchy, like so: Essentially, user is associated with any entity in the hierarchy via the top-most association table AccountCountryAssignment. Now, to give user access to lower level entities via XPath, I need to traverse all the way up: Which makes the XPath pretty long: Is this still a valid way of doing it, or is it better to denormalize, and associate each entity in the hierarchy with the top-most entity directly? That would make things complicated, if for some reason the top most entity association needs to be changed - I would need to traverse all the children down, additionally risking something gets missed, leading to severe inconsistency. Any clues how to solve this efficiently and safely?
↧