-->
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: cryptic note In the topic "Inside explanation of inverse=tru
PostPosted: Mon Oct 19, 2009 10:24 am 
Newbie

Joined: Mon Oct 19, 2009 10:05 am
Posts: 1
In the topic "Inside explanation of inverse=true"
I have found rather cryptic note in the "update" section:
Quote:
Will do the following SQL queries
Hibernate: select parent0_.id as id from parent parent0_ where parent0_.id=? //get parent 1
Hibernate: select parent0_.id as id from parent parent0_ where parent0_.id=? //get parent 2
Hibernate: select child0_.id as id, child0_.parent_id as parent_id from child child0_ where (child0_.parent_id=? ) //get children of parent 1
Hibernate: select child0_.id as id__, child0_.id as id, child0_.parent_id as parent_id from child child0_ where child0_.parent_id=?
Hibernate: select child0_.id as id__, child0_.id as id, child0_.parent_id as parent_id from child child0_ where child0_.parent_id=?

//load childrens of Parent 1 and 2 (can't avoid this with set, see FAQ)
Hibernate: update child set parent_id=? where id=?

I have searched all FAQ I could find but never found an explanation or elaboration
on this note. (Was I looking in wrong places?) This is exactly behavior I have see in the application I am working on.
It affects application in a very bad way as we have over 70 of these selects issued and
what is a real killer - database they go to is remote, located in Europe.

I would like to know why this happens and how to get rid of these.
Any explanation or pointers to relevant info will be greatly appreciated.

Thanks.


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.