Re: EOAndQualifier order
Re: EOAndQualifier order
- Subject: Re: EOAndQualifier order
- From: Francis Labrie <email@hidden>
- Date: Wed, 11 Jul 2007 19:27:30 -0400
Hi Miguel!
Miguel Arroz wrote:
I'm looking and the generated SQL from an EOAndQualifier, and it
looks like the order of the "anded" stuff is the inverse one I
write on the code. If I write a qualifier like "bananas = %@ and
apples = %@ and oranges = %@", the generated SQL will be the
reverse (t0.oranges = (...) AND t0.apples = (...) AND to.bananas =
(...)".
Is this normal? Is the order random? What's happening here? I'm
asking this, because from what I understand form the PostgreSQL
docs, the order of the stuff in ANDs (and ORs) may have cause a
really big difference in performance when indexes (and multi-
indexes) are envolved.
I would say it's abnormal. The problem lies in specialized inner
classes of com.webobjects.eoaccess.EOQualifierSQLGeneration: it seems
all _AndQualifierSupport's and _OrQualifierSupport's loops are done
in reverse order! Probably a programmer practice consequence to avoid
extra "array.count()" calls in loop... ;-)
I would fill a bug report for that one, just to make sure SQL
generator for EOQualifier arrays keep the original order whenever
it's possible.
Kind regards,
--
Francis Labrie, System Architect, OS communications informatiques -
Your communication engine
email@hidden | Phone: (450) 676-1238 ext. 27 | Fax: (450) 676-5276
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden