=== Table1 ====
fooId
a
==== Table2 -====
barId
b
==== Table3 ==== (This table is joined from Table1 and Table2)
fooIdEx
barIdEx
===== a.java ===
....
private int foodId;
private String a;
private Set[b] bEnitty;
.......
===== b.java ======
......
private int barId;
private STring b;
............
===== a.hbm.xml (Mapping xml file) ======
.......
......
please refer to http://www.xylax.net/hibernate/manytomany.html
No comments:
Post a Comment