How to delete bidirectional many-to-many association

后端 未结 1 619
情深已故
情深已故 2020-12-31 08:35

Problem:

I have many-to-many association between two entities A and B. I set A entity as an

相关标签:
1条回答
  • 2020-12-31 09:04

    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.

    0 讨论(0)
提交回复
热议问题