• 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
@count keypath in qualifier
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@count keypath in qualifier


  • Subject: @count keypath in qualifier
  • From: Greg <email@hidden>
  • Date: Wed, 3 Aug 2005 10:33:17 +1000

Hi,
I am trying to construct a qualifier that will count the items in a relationship. I have sale.@count, but it is throwing an exception when trying to parse the @ character. Is it possible to use this type of kvc in a qualifier?


Any help is greatly appreciated.

Regards,
Greg


public static NSArray allClientsWhoHaventSignedUpWantingEmail (EOEditingContext ec) {
EOSortOrdering lastName = EOSortOrdering.sortOrderingWithKey ("lastName", EOSortOrdering.CompareCaseInsensitiveAscending);
EOSortOrdering firstName = EOSortOrdering.sortOrderingWithKey ("firstName", EOSortOrdering.CompareCaseInsensitiveAscending);
NSMutableArray order = new NSMutableArray();
order.addObject(lastName);
order.addObject(firstName);
EOQualifier onlyWantingContact = EOQualifier.qualifierWithQualifierFormat("wantsEmailContact = %@", new NSArray(new Boolean(true)));
EOQualifier hasMoreThan1Sale = EOQualifier.qualifierWithQualifierFormat("sales.@count > 1", null);
EOQualifier objs[] = { onlyWantingContact, hasMoreThan1Sale };
EOAndQualifier ands = new EOAndQualifier(new NSArray(objs));
EOFetchSpecification fetchSpec = new EOFetchSpecification ("Client", ands, order);
return ec.objectsWithFetchSpecification(fetchSpec);
}
_______________________________________________
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: @count keypath in qualifier
      • From: Anjo Krank <email@hidden>
    • Re: @count keypath in qualifier
      • From: "Jerry W. Walker" <email@hidden>
  • Prev by Date: Re: setNumberOfObjects in an NSArray [SOLVED]
  • Next by Date: Utilising the "Documentation" group
  • Previous by thread: Re: PDF APIs?
  • Next by thread: Re: @count keypath in qualifier
  • Index(es):
    • Date
    • Thread