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.