-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hpw to Store Map
PostPosted: Mon Feb 27, 2006 7:59 pm 
Newbie

Joined: Mon Feb 06, 2006 4:00 pm
Posts: 5
Hi,

I am new to Hibernate. I just want to know is there a way to persist my map (List of entities) in a single statement, instead of saving each Object entity in loop.

Thanks
Srikanth.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 28, 2006 12:48 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
If you mean a single line of java code, then that's easy. Just set the appropriate cascade levels in your inverse="false" set/map/list/whatever.

If you mean that you want to issue a single SQL insert/update, and have it save everything in one statement, then no, that's not possible. Not all DBMSs support bulk inserts, and very few support bulk updates. Hibernate 3.1 did add support for bulk inserts, but it's very limited. I haven't used it yet, but you can read up on it in section 13.4, "DML-style operations", of the ref docs.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.