File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Hibernate multi row insert Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate multi row insert" Watch "Hibernate multi row insert" New topic
Author

Hibernate multi row insert

anuja Edathu
Ranch Hand

Joined: Sep 09, 2005
Posts: 84
Hi all,
How can we insert multi row in to a table using single database access using hibernate?can any one help?
Thanks & Regards ,
Anuja K.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Yes. You can save multiple object within one Session. Multiple inserts/updates will happen anyway if you update an object with multiple associates.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
anuja Edathu
Ranch Hand

Joined: Sep 09, 2005
Posts: 84
Thank you,
Can you tell me how can i call a stored procedure in hibernate?
Regards
Anuja K.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Well, its Hibernate3 only: use the <sql-query /> element to map your stored procedure (as you would for any named query). See here.
anuja Edathu
Ranch Hand

Joined: Sep 09, 2005
Posts: 84
Hi,
Thanks for your link i think it will do for me
Regards,
Anuja K
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate multi row insert