Hi
I am using HIbernate 3 with Hibernate Tools 3.1 beta 1. I reverse engineer database using hbm2hbmxml task which generates .hbm.xml files. Max from Hibernate team mentioned that many-to-many relation is not supported yet ... e.g.
Table A, B and CR (Cross Reference)
CR has a composite key made of A_id and B_id.
Hibernate Tools task creates .hbm.xml files such a way that A has one-to-many with CR, CR has many-to-one with A.
B has one-to-many with CR, CR has many-to-one with B.
CR being a separate hbm.xml file, eventually produces a separate POJO also. As this extra object being unnecessary and overall code handling CR now been increased I am having second thoughts to go with Hibernate 3 or not.
Like Max said, I looked at JDBCBinder.java and felt like I can not really add required functionality any time soon. Has any one come across similar situation or resolved it ?
Thanks
Ron
|