blindly loading all lazy relations is not a good idea. if you need the lazy
relations loaded, then load them explicitly.
var root = session.createquery("from root r join fetch r.other o where
...").UniqueResult<Root>();
if lazy collections are involved.
var root = session.createquery("from root r join fetch r.other o where
...").FutureValue<Root>();
session.createquery("from root r join fetch r.children r where
...").SetResultTransformer(Transformers.DistinctRootEntity).FutureValue<Root>();
session.createquery("from root r join fetch r.otherchildren r where
...").SetResultTransformer(Transformers.DistinctRootEntity).FutureValue<Root>();
same applies to criteria and queryover.
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.