Let me presnet a simple <one-to-many> association from Parent to Child. XML Code: <set name="children"> <key column="parent_id"/> <one-to-many class="Child"/> </set> Assume that we wish to execute the following code: Java Code: Parent p = .....; Child c = new Child(); p.getChildren().add(c); session.save(c); session.flush(); ...
<set name="children"> <key column="parent_id"/> <one-to-many class="Child"/> </set>
Parent p = .....; Child c = new Child(); p.getChildren().add(c); session.save(c); session.flush();
Size Reduced for Images in PDF &...
05-15-2013, 05:53 PM in Java Software