I'm using Hibernate as my dao. I have a child table (AUTHORITY) which Hibernate will delete from, but will not insert into. From my logs, it isn't even trying to insert into the table when I insert/update into my parent table (USERS). The tables are getting created the way I want and my classes are getting created the way I want. I perfer that my child class not have visibility to the parent, through the username column.
Other info: Happening with MySQL and DB2 databases; Weblogic Server 8.1.6, Tomcat 5.5 and Tomcat 6.0; Java compile version 1.4.2_11
I'm guessing I have something wrong in my mapping of the USERS table, since that is the parent. I've tried different combinations of the bags properties inverse and cascade, but nothing I've tried is working. I've even tried to use a set instead of a bag and that has not been successful.
Please let me know if there is any other information which would be helpful
Thanks for any help.
My parent table mapping (USERS):
My child table mapping (AUTHORITY):
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database