Re: EOAndQualifier order
Re: EOAndQualifier order
- Subject: Re: EOAndQualifier order
- From: Chuck Hill <email@hidden>
- Date: Wed, 11 Jul 2007 16:29:54 -0700
On Jul 11, 2007, at 4:27 PM, Francis Labrie wrote:
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!
Does that not make it normal then? :-P
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:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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