-->
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.  [ 6 posts ] 
Author Message
 Post subject: cannot fetch multiple collections in one query???
PostPosted: Wed Oct 05, 2005 12:11 pm 
Regular
Regular

Joined: Thu Dec 02, 2004 10:42 am
Posts: 54
I got this Exception when doing 2 join fetch for 2 collections of the class in Hql.
Then, trace the problem into Hql/QueryTranslator.cs, I found this code:

Code:
public void SetCollectionToFetch( string role, string name, string ownerName, string entityName )
      {
         if( fetchName != null )
         {
            throw new QueryException( "cannot fetch multiple collections in one query" );
         }
...
}


Compare it to source code of Hibernate 2.1.8, it doesn't have this limitation? Why needed for NHibernate? When I took it out, the compact I got is it can return duplicate objects, but that's usual thing for using Hql.


Top
 Profile  
 
 Post subject: ok, it's not implemented yet
PostPosted: Wed Oct 05, 2005 12:16 pm 
Regular
Regular

Joined: Thu Dec 02, 2004 10:42 am
Posts: 54
I try the code with this checking comment out.

Only the latest join fetched collection get initialized.

Is it a bug in Hibernate 2.1.8? Can we correct it here is NHibernate?


Last edited by orientphoebus on Thu Oct 06, 2005 8:55 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 06, 2005 6:01 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Yes, that's a Hibernate 2.1 limitation. Not really easy to fix.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 06, 2005 8:57 am 
Regular
Regular

Joined: Thu Dec 02, 2004 10:42 am
Posts: 54
sergey wrote:
Yes, that's a Hibernate 2.1 limitation. Not really easy to fix.


May I ask what is NHibernate's remote plan to begin to move to Hibernate 3? Half year? 1 year or 2 ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 06, 2005 10:28 am 
Contributor
Contributor

Joined: Sun Jun 26, 2005 5:03 am
Posts: 51
Location: London, UK
I would guess work would start in the next month or two, but will be initially done against Framework 1.1 - I know 2.0 is now RTM, but I have projects which will need HIbernate 3.0 capabilities under 1.1 so that's where I'm going to start :D

Feel free to chip in with .NET 2.0 features in the code with conditional compilation - it's only going to affect a small number of areas I think.

_________________
Paul Hatcher
NHibernate Team


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 06, 2005 1:30 pm 
Regular
Regular

Joined: Thu Dec 02, 2004 10:42 am
Posts: 54
This is great. I think I am going to stuck in .Net 1.1 for a while also, and there are lots of Hibernate3 features I'd like to have from NHibernate.

looking forward to it: :D


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