• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EOAndQualifier order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: EOAndQualifier order
      • From: Chuck Hill <email@hidden>
References: 
 >EOAndQualifier order (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Re: Model Cloning
  • Next by Date: Re: EOAndQualifier order
  • Previous by thread: Re: EOAndQualifier order
  • Next by thread: Re: EOAndQualifier order
  • Index(es):
    • Date
    • Thread