This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate problem with bulk inserts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate problem with bulk inserts" Watch "Hibernate problem with bulk inserts" New topic
Author

Hibernate problem with bulk inserts

Ahsan Bagwan
Ranch Hand

Joined: Oct 05, 2010
Posts: 157
I'm trying to insert new rows in one table, and update rows in other table as well. While updating works fine in one table, its the insert in that table that is problematic. Hall_calendar, which has composite keys, is where I want the update to take place as well as insert new value. Hall_block_calendar is where form values are persisted when after updating other table, which is working fine on session.save(hbc) .

I've commented the part in the dao which is working wrong. I'm stuck and would be grateful for any help with the code. Apologies for the bad code practice.

This is my DAO method. The for's else if statement is where I try batch update.



This is my servlet class



Mapping file for updating table



Mapping to persist form values



VO for hall_calendar and hall_block calendar,




VO for composite fields,

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate problem with bulk inserts
 
Similar Threads
Unparseable date exception
Hibernate Query by Example
How do i print 1 as 01?
SimpledateFormat class issue.
Date Format ,Please help!