-->
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.  [ 2 posts ] 
Author Message
 Post subject: Lazy loading
PostPosted: Mon Jul 26, 2010 5:01 am 
Newbie

Joined: Mon Jul 26, 2010 4:36 am
Posts: 2
I have a technical problem with the lazy loading of Hibernate in combination with a many-to-one mapping.
In my domain model i have the following
class Person
private PersonType type;

My mapping looks like this
<many-to-one name="type" column="..." class="....PersonType" lazy="no-proxy"/>

So as you can see, i don't want PersonType retrieved from the db if i load a Person.
But this doesn't work.

In the mapping of PersonType looks like this
<hibernate-mapping default-cascade="none" default-lazy="false">
<class name="....PersonType" table="...">
if i remove the default-lazy=false, the type of the person is not retrieved, but this is a problem for me because a load of PersonType does not retrieve the properties of this object
and this i want hibernate to load the properties of PersonType in this case.
Is there a solution for this case ?

Thanx for helping me


Top
 Profile  
 
 Post subject: Re: Lazy loading
PostPosted: Mon Aug 02, 2010 2:54 pm 
Newbie

Joined: Mon Jul 26, 2010 4:36 am
Posts: 2
No comments, is there nobody having this problem ???


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