I know that only one collection per query is allowed, but that is to avoid cartesian product. However, mapping a collection within a collection is not a cartesian product, and the outer joins should be limited only by max_fetch_depth. In my example, Trade has a lazy=false collection of TradeLegs, and each TradeLeg has a lazy=false collection of Quantities... this should be no problem for my max_fetch_depth 5... and yet I get the following error...
Message : cannot fetch multiple collections in one query [ from BP.IST.Domain.Trade.Trade t left join fetch t.TradeLegs l left join fetch l.Quantities q where ((((t.InternalCounterParty.Id = 1950) AND ((l.EffectiveDates.From <= '31-Jul-2005') AND ((l.EffectiveDates.To >= '1-Jul-2005') AND ((q.EffectiveDates.From <= '31-Jul-2005') AND (q.EffectiveDates.To >= '1-Jul-2005'))))) AND (l.PipelineId = 1903)) AND (l.TradeZoneId = 289))]
Am I missing something? Or is the multiple collections limitation overriding the max_fetch_depth?
Thanks.
BTW... this worked great previously with .9.... busted with 1.0
|