-->
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.  [ 4 posts ] 
Author Message
 Post subject: Lazy Loading: lazy=no-proxy vs. lazy="proxy"
PostPosted: Wed Dec 07, 2005 4:49 pm 
Beginner
Beginner

Joined: Tue Nov 15, 2005 6:56 pm
Posts: 39
I'm using the latest hibernate tools 3.1. beta1.

I'm getting this error upgrading to the newest hibernate tools:

Code:
Attribute "lazy" with value "true" must have a value from the list "false proxy no-proxy ".


My mapping file has this definition for my many-to-one mapping:

Code:
<many-to-one name="dRange" class="DRange" column="DRANGE_ID" outer-join="true" lazy="true" insert="true" update="true" not-null="false"/>


The DTD I'm using is

Code:
http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd


and it says:

Code:
<!ATTLIST many-to-one lazy (true|false|proxy|no-proxy) #IMPLIED>


My questions are:

1) Why does the error I'm using contradict the DTD I'm using. Is there a newer DTD?
2) Is having outer-join="true" the same as fetch="join"?
3) By specifying outer-join-"true" or fetch="join", is it implict that lazy="false"? Is, so is having the lazy="true" attribute a contradiction? What would happen?
4) If the error is valid, how do I judge whether I need to specify lazy="proxy" or lazy="no-proxy" for cases when I want lazy to be true?

Any help is appreciated. Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 5:15 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
many-to-one lazy´true does not work very well and were thus replaced with these new settings in 3.1.

The setting )lazy=true ) in 3.0 will only work with bytecode instrumentation and doesnt have good fallbbacks - so in short...don't use it ;)

use the new stuff in 3.1 if you want it .

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 6:11 pm 
Beginner
Beginner

Joined: Tue Nov 15, 2005 6:56 pm
Posts: 39
ok, but can you please help me with this question:

4) If the error is valid, how do I judge whether I need to specify lazy="proxy" or lazy="no-proxy" for cases when I want lazy to be true?


Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 6:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
best place is to read the 3.1 documentation.

for 3.0 simply dont set the attribute.

_________________
Max
Don't forget to rate


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

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.