• 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
Qualifier with key path keywords
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Qualifier with key path keywords


  • Subject: Qualifier with key path keywords
  • From: Greg <email@hidden>
  • Date: Tue, 26 Apr 2005 09:42:27 +1000

Hi,
I am wanting to find all the clients that have made more than 1 purchase. I have the following qualifier:


public NSArray customersWhoHaveBoughtMoreThanOnce() {
EOQualifier sales = EOQualifier.qualifierWithQualifierFormat("sales.@count > 1", null);
EOSortOrdering lName = EOSortOrdering.sortOrderingWithKey("lastName", EOSortOrdering.CompareAscending);
EOSortOrdering fName = EOSortOrdering.sortOrderingWithKey("firstName", EOSortOrdering.CompareAscending);
Object args[] = {lName, fName};

EOFetchSpecification fetchSpec = new EOFetchSpecification("Client", sales, new NSArray(args));
return theSession().defaultEditingContext().objectsWithFetchSpecification(fetch Spec);
}


It throws an exception saying that it is a problem parsing the '@'. If I remove the '@' symbol from the qualifier it too fails as there is no count found. I read through the EOQualifier javadoc but it didn't show any examples of building a qualifier with '@', but it too didn't say whether or not it is illegal to do it.

Is it possible to use the '@' symbol in a qualifier and I'm just using it incorrectly?
Is there a better way to achieve this?


Any help is greatly appreciated.

Regards,
Greg

_______________________________________________
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: Qualifier with key path keywords
      • From: Chuck Hill <email@hidden>
    • Re: Qualifier with key path keywords
      • From: Sacha Mallais <email@hidden>
  • Prev by Date: Re: Multiple (dynamic) file uploads
  • Next by Date: EnhancedFileUploadTools [solved]
  • Previous by thread: Re: Multiple (dynamic) file uploads
  • Next by thread: Re: Qualifier with key path keywords
  • Index(es):
    • Date
    • Thread