Hi,

I use Session.Merge to update detached entities(A root entity
containing dozens of child entities to which the Merge is cascaded).
When I do the Merge, NHibernate fetches entities from the database by
doing one SELECT for each entity, and that leads to a lot of
SELECT...this doesn't seem to be very efficient.
Is there a way to make NHibernate batch the SELECTs during a
Merge(like batch-size, but it doesn't seem to work for Merge)
So we would have :
  SELECT ... FROM A WHERE Id in (1,2,3,4,5,6)
instead of
   SELECT ... FROM A WHERE Id  = 1
   SELECT ... FROM A WHERE Id  = 2
   SELECT ... FROM A WHERE Id  = 3
   SELECT ... FROM A WHERE Id  = 4
   SELECT ... FROM A WHERE Id  = 5
   SELECT ... FROM A WHERE Id  = 6

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to