• 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 on child entity property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOAndQualifier on child entity property


  • Subject: Re: EOAndQualifier on child entity property
  • From: Sacha Michel Mallais <email@hidden>
  • Date: Thu, 17 Aug 2006 16:47:07 -0700

On Aug 17, 2006, at 4:04 PM, Yann Bizeul wrote:

Say an entity MyEntity, having a many-to-many relationship with a Tag entity, the purpose of that is tagging MyEntity with one or more keywords (tags)

Now I want to get all MyEntity having "tag1" AND "tag2" as tags. An EOAndQualifier is nonsense in the result sql since if queries "tag1" = "tag1" AND "tag1" = "tag2", EOOrQualifier is not better since I need to match entries having *both* tags

Try "myAttribute CONTAINS %s AND myAttribute CONTAINS %s" for a format string, with params of "tag1" and "tag2", as in (warning, untested code):


EOQualifier q = EOQualifier.qualifierWithQualifierFormat("myAttribute CONTAINS %s AND myAttribute CONTAINS %s", new NSArray(new Object[] {tag1, tag2}));


sacha


-- Sacha Michel Mallais Senior Developer / President Global Village Consulting Inc. http://www.global-village.net/ PGP Key ID: 7D757B65 AIM: smallais So it doesn't mess up the flow of reading. > How come? > > I prefer to reply inline. > > > What do you do instead? > > > > No. > > > > > Do you like top-posting?



_______________________________________________
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 on child entity property
      • From: Yann Bizeul <email@hidden>
    • Re: EOAndQualifier on child entity property
      • From: Alexander Spohr <email@hidden>
    • Re: EOAndQualifier on child entity property
      • From: Chuck Hill <email@hidden>
References: 
 >EOAndQualifier on child entity property (From: Yann Bizeul <email@hidden>)

  • Prev by Date: Re: Open source as the way some important software is developed
  • Next by Date: Re: No announcement yet?
  • Previous by thread: EOAndQualifier on child entity property
  • Next by thread: Re: EOAndQualifier on child entity property
  • Index(es):
    • Date
    • Thread