Goran:Can you check against the field instead of get method? It seems the optimizer doesn't handle it.
Hi Goran,
just to make things clear: if bean-conventions are used, it should work with accessors, too... at least I think so...;-)
So: if the field is called referenceId, getReferenceId() should be resolved by the NQ-Parser to fetch the appropriate field. But if the field is called id, but the accessor is still called getReferenceId(), the query cannot be optimized. Maybe this is the problem.
And just another one: If I remember correctly, the accessor needs to be a "real simple" accessor, which consists simply of a "return referenceId"... if there's more code involved in the accessor, the NQ-Parser does a good job if it doesn't optimize the query...
Cheers, Maik
http://db4o.blogspot.com/