-->
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: Persisted entity and merge again, never lazy-loaded
PostPosted: Tue Apr 03, 2007 9:50 pm 
Newbie

Joined: Fri Feb 02, 2007 6:55 am
Posts: 8
I have 3 entity

A -> B <-> C

All assoc is OneToMany (from left to right),
the arrow indicate uni-dir or bidi.

For the B and C association, C is the owning side.

When persist a entity (a tree with around 4 level) and then
merged again.

The returned entity (Java instance) is the exact copy I used to persist.

When this seems reasonable.

However, when I access properties
List<C> something = a.getB().getC();

it is null.

But I expect I can get a enchaned version of B,
so getC will trigger lazy-loading.

Is my understanding wrong, or I have missed anything?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 12, 2007 4:47 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This is not the correct behavior but you don't give enough of the context to be helpful.
Try and repost using the question template.

_________________
Emmanuel


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.