-->
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.  [ 6 posts ] 
Author Message
 Post subject: how can I prevent the loading of both ends of a relation?
PostPosted: Mon Jan 24, 2005 5:48 am 
Beginner
Beginner

Joined: Tue Nov 09, 2004 6:26 am
Posts: 32
Hello

I have this many-to-one relation defined

<class name="ProfileAssociation" ...>
....
<many-to-one name="parentProfile"
class="Profile"
column="PPROFILE_ID"
insert="false" update="false"/>
</class>

When I load ProfileAssociation I realy don't want to load parentProfile with it :( I want to retrivet only when I ned it, using my HSQL select.
What can I do?

Thank you


Top
 Profile  
 
 Post subject: Re: how can I prevent the loading of both ends of a relation
PostPosted: Mon Jan 24, 2005 6:46 am 
Beginner
Beginner

Joined: Tue Nov 09, 2004 6:26 am
Posts: 32
I know it's a stupid question and I'm looking in Hibernate in Action now. Give me a clue at least where to look :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2005 6:53 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Chapter 4.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2005 7:11 am 
Beginner
Beginner

Joined: Tue Nov 09, 2004 6:26 am
Posts: 32
christian wrote:
Chapter 4.


I've read about "Persistence by reachability" and about "Cascading persistance with Hibernate".
I used cascade="none", but I have obtainend the same behaviour :(


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2005 7:16 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Read on.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2005 7:50 am 
Beginner
Beginner

Joined: Tue Nov 09, 2004 6:26 am
Posts: 32
[quote="christian"]Read on.[/quote]

I think I found it. lazy="true"

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.