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 Entity perisistence with triggers on child 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 "Entity perisistence with triggers on child" Watch "Entity perisistence with triggers on child" New topic
Author

Entity perisistence with triggers on child

Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Folks,

I have a siutation where I need to insert one parent and many lines to it. My problem is when i try to insert one line it works fine with the following code. but when i try to insert more then one line i get the following error which is due to the BEFORE INSERT trigger FOR EACH ROW which is getting fired on lineItems table.




where objLineItems is a populated line data object

Also the relationship i have defined is as follows :


Orders


LineItems



Can you tell me if there is a way in which we can insert multiple lines with trigger on the child table.

Thanks,
Rahul
[ June 24, 2008: Message edited by: Rahul Juneja ]

Rahul Juneja
ThoughtClicks - http://techlabs.thoughtclicks.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity perisistence with triggers on child
 
Similar Threads
Form Params not passed properly
Hibernate 3 Annotations
reInstantce
generics
exception