-->
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.  [ 3 posts ] 
Author Message
 Post subject: HOWTO encourage Hibernate to load objects with..
PostPosted: Sun Oct 09, 2005 1:20 pm 
Beginner
Beginner

Joined: Tue Aug 23, 2005 8:15 am
Posts: 45
... their attributes of type collection in ONE query in case of classes hierarchy?

For example:
There is a base Class B, and derived classes D1, D2, D3.

I want get all objects inherited from B with HQL query:
FROM B

How can I say to NHibernate to retrieve all objects of inherited class with their attributes of type collection in one HQL query?

I use Hiberante version 2.x

Best regards,
Sergey


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 09, 2005 2:37 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
NHibernate, you mean the .net version? 'N' is close to 'H' on the keyboard ;-)

I'm not sure I understand your question. "FROM B" is going to return D1s and D2s .


Top
 Profile  
 
 Post subject: 2 dennisbyrne
PostPosted: Sun Oct 09, 2005 4:35 pm 
Beginner
Beginner

Joined: Tue Aug 23, 2005 8:15 am
Posts: 45
I use NHibernate and previously a posted this message to NHibernate forum but was not answered.

Yes, you are right.
"FROM B" is going to return D1s and D2s

But I don't know how to encourage Hibernate to
load all collections (sets, bags and so on) that are in D1 and
D2 classes in THE SAME QUERY.

All collections are lazy but I want not turn lazy mode off.

I just want to load entire objects of classes inherited form B in
ONE query and only in THAT query.



dennisbyrne wrote:
NHibernate, you mean the .net version? 'N' is close to 'H' on the keyboard ;-)

I'm not sure I understand your question. "FROM B" is going to return D1s and D2s .


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