-->
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: proxies are not initialized in the same session!
PostPosted: Wed Apr 06, 2005 1:59 pm 
Senior
Senior

Joined: Sat Nov 27, 2004 4:13 am
Posts: 137
Hibernate version: 2.1.8

Hi,
I've got some entities in my system (which are lazy="true").

I've got following entities:

FormSpec -------{FieldSpec
| |
/|\ /|\
Form-------------{Field

(there are many-to-one relations between Form-FormSpec, Field-FieldSpec, FieldSpec-FormSpec, and Field-Form)

when I run following query Form and its associated fields are fetched and proxies to FormSpec and FieldSpecs are created (just as it should).

from
Form as from
join fetch form.fields
where
form.id = :formId


and then when I execute following query in the same session, again proxies (which are not initialized) are returned!

from
FormSpec as formSpec
join fetch formSpec.fields
where
formSpec.id = :specId


but when I execute second query in another session valid objects are returned (not proxies).

what should I do, so when I run queries in the same session both return valid (not proxies) objects.

_________________
don't forget to credit!

Amir Pashazadeh
Payeshgaran MT
پايشگران مديريت طرح
http://www.payeshgaran.co
http://www.payeshgaran.org
http://www.payeshgaran.net


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.