This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Hibernte will delete rows from a table, but it won't insert rows  RSS feed

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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):

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!