-->
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: Lazy Loading bei <Component ...> funktioniert nicht
PostPosted: Tue Jun 13, 2006 3:07 am 
Newbie

Joined: Thu Apr 20, 2006 8:26 am
Posts: 5
Ich habe ein Object

Code:
class User {
    ...
}

class MetaData {
    Date creationTime;
    User creationUser;
    Date modificateionTime;
    User modificationUser;
    ...
}

class Foo {
    String attr1;
    String attr2;
    MetaData metaData;
    ...
}


mein Mapping sieht im groben so aus

Code:
<class name="Foo" table="foo">
    <property name="attr1" column="attr1" />
    <property name="attr1" column="attr1" />
   
    <component name="metaData" class="MetaData" lazy="true">
        <many-to-one name="creationUser" class="User" column="creation_user" not-found="ignore" fetch="select" lazy="no-proxy"></many-to-one>
        <property name="creationTime" type="timestamp" column="creation_time" />
        <many-to-one name="modificationUser" class="User" column="modification_user" not-found="ignore" fetch="select" lazy="no-proxy"></many-to-one>
        <property name="modificationTime" type="timestamp" column="modification_time" />
    </component>
</class>



Funktionieren tut das ganze, aber ich bekomme jedes mal die User mit selektiert in meinen Sql Statements, was ja eigentlich nicht passieren soll, sowohl in component selbst als auch bei den many-to-one Beziehungen ist ja lazy loading eingestellt.

Bei ganz normalen many-to-one properties klappt das, nur sobald sie innerhalb des Component Abschnittes auftauchen geht das nicht mehr. Somit habe ich bei 200 zu findenden Zeilen 401 Statements die ausgeführt werden.

Hat irgendjemand eine Idee?

Jürgen


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.