-->
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.  [ 9 posts ] 
Author Message
 Post subject: Bulk Updates and Deletes
PostPosted: Thu Nov 10, 2005 8:26 am 
NHibernate supports Bulk updates and Deletes? i could not find executeUpdate() method for query interface.
thanks in Advance
Sarin


Top
  
 
 Post subject:
PostPosted: Thu Nov 10, 2005 11:13 am 
Regular
Regular

Joined: Thu May 12, 2005 10:12 am
Posts: 71
Location: Buenos Aires, Argentina
Nhibernate does not currentyl support bulk update and delete. Remember it is ported from hibernate 2.1 and bulk operations appeared on version 3.x.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 17, 2006 3:25 pm 
Beginner
Beginner

Joined: Wed Jun 08, 2005 4:59 pm
Posts: 27
So how do people handle such cases now? I see there is a helper method for delete (with serious performance implications), is the "recommended" way to handle updates the same? I.e. if I need to perform a bulk update on a large number of records, my only option is to load 1 by 1, update and save?

thanks!
-MT


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 17, 2006 11:30 pm 
Senior
Senior

Joined: Mon Aug 21, 2006 9:18 am
Posts: 179
You may find help at http://www.ayende.com/Blog/2006/09/16/BatchingSupportInNHibernate.aspx.

_________________
If this helped...please remember to rate it!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 18, 2006 1:13 am 
Beginner
Beginner

Joined: Wed Jun 08, 2005 4:59 pm
Posts: 27
I am not sure how that helps? I dont want to turn batching on outright and I dont see a way to do this for just one method. Besides, that is not the question I am asking. How did the Hibernate community hangle this prior to Hib3?

-MT


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 18, 2006 1:38 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You'll have to use ADO.NET to perform bulk operations.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 18, 2006 10:24 am 
Beginner
Beginner

Joined: Wed Jun 08, 2005 4:59 pm
Posts: 27
sergey wrote:
You'll have to use ADO.NET to perform bulk operations.


Is there a way to have ADO.Net participate in the transaction?

Thanks!
-MT


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 18, 2006 11:21 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Yes, ITransaction.Enlist(IDbCommand).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 18, 2006 3:03 pm 
Newbie

Joined: Sat May 14, 2005 2:17 pm
Posts: 18
I think Batch operation are just checked in by Ayende. So you might try the trunc.

ps.
Is there a time frame for a non beta 1.2.0 version. It seems that the last stable is from january which is .net 1.1 only. It feels too long. I use the alpha with great succes and do not understand the reason for not releasing an official 1.0 version with generics support.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 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.