The above configuration is working in my application, but I want to add a new many-to-many table called Admin_Has_Roles between the Admin and the Roles table. In the admin.hbm.xml file, I added the following:
I did not add a new set to the Role.hbm.xml file since I don't want the Customer table to inherit the Admin_Has_Roles relationship. When I try to save an Admin object in my application, I now get the following Hibernate exception:
What am I doing wrong with my hibernate config? Why can't I create a many-to-many relationship between Admins and Roles?