-->
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: performance problems with one-to-many association
PostPosted: Tue Nov 09, 2004 12:57 pm 
Newbie

Joined: Thu Oct 14, 2004 7:38 am
Posts: 5
Hi,

I have some performance problems, when initializing the RwpXVersRelevants-set with Hibernate.initialize(). When I take a look at the SQL-statements I see, that there is first a select on "X_VERS_RELEVANT" by "IDVAR". This returns a result of 8 rows. For every row there is another request on "X_VERS_RELEVANT" by "IDVAR" and "IDRELV".
The first select has all the information needed. So, why these selects for every row ?
Is there a way to prevent these selects ?

Hibernate version:
2.1.6
Mapping documents:
<class name="CatiaVariable" table="CATIAVD_VARIABLE">
<id name="id" type="integer" column="ID" >
<generator class="assigned"></generator>
</id>
<property name="name" column="VAR_NAME" type="string"/>
...
<set name="RwpXVersRelevants" table="X_VERS_RELEVANT" lazy="true" inverse="true">
<key column="IDVAR" />
<one-to-many class="RwpXVersRelevant"/>
</set>
</class>

<class name="RwpXVersRelevant" table="X_VERS_RELEVANT">
<composite-id>
<key-many-to-one name="catiaVariable" class="CatiaVariable" column="IDVAR" />
<key-many-to-one name="versRel" class="VersRel" column="IDRELV" />
</composite-id>
<property name="isDeleted" column="ISDELETED" type="boolean"/>
<property name="isRelevant" column="ISRELEVANT" type="boolean"/>
<property name="text" column="TEXT" type="string"/>

</class>

Thank you for any idea !


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.