Problem:
I have many-to-many association between two entities A and B.
I set A entity as an
I do not see what is not elegant about the code. It works fine in all cases and does not do any extra stuff which it is not supposed to. When I say A is owning side is a relationship AB, this would imply that creating or deleting the relationship lies in the hands of A. B has no say in the relationship. So if I want to move B somewhere else, A has to let go of B before B can be moved away. Hence, when choosing the owning side you should consider what you are going to do with the objects.