Hibernate link notes and hibernate link notes
HibernateLink notes
* Joined table: Use <join>/<join-to-one> on the N side. You do not need to configure the associated persistence class.
* No join table: Use <sequence-to-one> on the N side. You do not need to configure the associated persistence class.
* Connected table: Use <set>/<sequence-to-sequence> On the first side, and set the unique attribute to true in sequence-to-sequence. Nparty does not need to configure the associated persistence class.
* No join table: Use <set>/<one-to-sequence> On the first side. Nparty does not need to configure the associated persistence class.
Note: cascadeIn <set>Configure on
* Connected table: the first party uses <set>/<sequence-to-sequence> and sets the unique parameter of <sequence-to-sequence> to true. Nparty uses <join>/<allow-to-one>
* No join table: the first party uses <set>/<one-to-sequence>. N-Party <role-to-one>
Note: Only 1Use inverseGive up control, NThe party cannot give up control because there is no inverseAttribute.
The control end uses <set>/<allow-to-operate>
Both sides use <set>/<relative-to-sequence>
* Foreign key-based: the console uses <role-to-one> and sets the unique attribute of <role-to-one> to true.
* Based on the primary key: the control end sets the ID generation policy to foreign and uses the <one-to-one> label.
* Connection-based table: the control end uses <join>/<join-to-one> and sets the unique attribute of <join-to-one> to true.
* Foreign key-based: one Party uses <sequence-to-one> and sets its unique parameter to true. The other party uses <one-to-one>
* Based on the primary key: one Party sets the ID generation policy to foreign and uses the <one-to-one> label. The other uses only the <one-to-one> label.
* Based on the connection table: <join>/<join-to-one> is used on both sides. Set the <key> unique attribute under <join> and the unique attribute of <join-to-one> to true. The inverse parameter must be set to true on both sides to give up control.