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
|