On Nov 13, 2003, at 11:54 AM, Jorge Sopena wrote:
> if (companies !=null)
> if (where !=null)
> where =
> where.andExp(ExpressionFactory.inExp("customer.company",companies));
> else
> where = ExpressionFactory.inExp("customer.company",companies);
> query.addPrefetch("customer.company")
With the combination of the above prefetch and qualifier, I think you
are being affected by the bug that I mentioned. Good news is that when
you have and IN qualifier for a set of companies, you don't need to
prefetch on them, since they are already in the memory... so as a
workaround you can do this when building a list of prefetches:
if(companies == null) {
query.addPrefetch("customer.company");
}
Andrus
This archive was generated by hypermail 2.0.0 : Thu Nov 13 2003 - 11:58:35 EST