-->
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.  [ 1 post ] 
Author Message
 Post subject: ICriteria with .Max projection hangs indefinitely
PostPosted: Mon Jul 27, 2009 5:03 am 
Newbie

Joined: Fri Dec 05, 2008 3:27 pm
Posts: 2
Hi,

I'm having trouble saving a huge entity to a database.
Imagine its an order with orderlines. My order has 700 order lines.

I'm not saving the orderlines through cascading. I'm forcing the Session.SaveOrUpdate for each orderline due to some business logic reasons.
For each orderline i'm using a criteria with a .Max projection to get a value I need. The second time this criteria runs it hangs out for minutes, so i suspect it is trying to get a lock for the orderline table and it can't.

The strange thing is that i've got other orders with less lines, lets say 10, and it works perfectly. Also with the order that has 700 lines i see a lot of threads being created and destroyed, so i suspect this is nhibernate's doing. I just don't understand why it works with 10 orderlines and not with 700.

Has anyone had similar behavior? I'm going to test with 50 / 100 / 300, etc, orderlines to see if i discover anything interesting.

In the meanwhile, if someone has any clue on this, please share your thoughts.

Best regards,
MF.


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

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.