many-to-many relationship middlegen for hibernate mapping files
sanjeev trivedi <[email protected]>
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Recently I started exploring hibernate and middlegen. Here is simple test. I used 3 tables say A,B and A_B (third table for many-to-many relationship). I found that for many-to-many relationship one seperate class is ceated(A_B) and also for PK class A_BPK is created.class A has one-to-many relationship with class A_B and same is the case with class B. What we want is that A should have Set of B as attribute and B should have Set of A as attribute rather than that of A_B, i.e. there should not be third class A_B. We are able to do this manualy by using many-to-many relationship tag in mapping file but thru' middlegen we are not able to achieve (middlegen gives us Set of A_B as attribute in class A and B both and this leads to the use of composite id and extra level of indirection). Any help, thanx in advance. Sanjeev __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com