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?