• 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
EOQualifier and to-many relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOQualifier and to-many relationships


  • Subject: EOQualifier and to-many relationships
  • From: Joe Kramer <email@hidden>
  • Date: Fri, 14 Dec 2012 14:27:55 -0800

Hi all,

I have a pretty simple model with a person object that has a to-many relationship to addresses. There are about ~30,000 people in the DB. I am trying to find people who have addresses that have a specific postal code.

My first attempt at writing the qualifier is horribly slow:

EOQualifier zipQual = ERXQ.startsWith(Person.ADDRESSES.append(Address.POSTAL_CODE).key(), _zipCode);

I created a D2W project and it can do something similar very in a very performant fashion right out of the box, so I know there isn't a problem with my DB (indexes, etc.). I am trying to find what the qualifier is that the query page uses. I can see that the SQL generated is quite a bit different than my qualifier. My qualifier causes a SELECT to happen on every row, whereas the D2W qualifier only runs a single SELECT.

Can anyone help me with a more efficient qualifier to find people across the to-many relationship? Or can someone point me to the D2W code that builds the qualifier on the query page?

Thanks,

Joe
 _______________________________________________
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: EOQualifier and to-many relationships
      • From: Ramsey Gurley <email@hidden>
  • Prev by Date: Fwd: Linux deployment changing server name
  • Next by Date: Re: EOQualifier and to-many relationships
  • Previous by thread: Re: WebObjects mentioned in Podcast
  • Next by thread: Re: EOQualifier and to-many relationships
  • Index(es):
    • Date
    • Thread