u j [http://community.jboss.org/people/bcn] created the discussion

"how to invert reverse generated many-to-many annotations?"

To view the discussion, visit: http://community.jboss.org/message/606695#606695

--------------------------------------------------------------
I have the classical user, user-role and role tables and use the option "detect 
many to many tables".
Hibernate reverse engineering creates the getRoles method in the user class 
with mappedBy attribute and the getUsers method in the role class with the 
JoinTable attribute. Since this does not let me create users with cascade to 
the user-role table, the annotations should be the other way round. How can I 
achieve this with the tool? I run it many times, so I don't want to change the 
classes each time by hand.
How does Hibernate decide which is the leading table?

Thanks
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/606695#606695]

Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to