Hibernte will delete rows from a table, but it won't insert rows
posted 8 years ago
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