• 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: Fetch spec capabilities
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fetch spec capabilities


  • Subject: Re: Fetch spec capabilities
  • From: Alexander Spohr <email@hidden>
  • Date: Fri, 02 May 2014 12:41:31 +0200

You could do it using GROUP BY HAVING COUNT with count being the number of categories.
I implemented a EOGroupByQualifier some years ago. I don’t think it made it into Wonder.



Am 02.05.2014 um 11:54 schrieb Elizabeth Lynch <email@hidden>:

> I've got a query which could be dealt with by building up qualifiers, but I'd prefer to use the model-based fetch spec.
>
> As background: I have three tables: Image, Category and CategoryImage.
>
> Image:
>     id     name
>
>     1      Fred
>     2      Joan
>
> CategoryImage
>    imageId   categoryId
>
>    1         10
>    1         20
>    1         30
>    2         15
>    2         20
>    2         30
>    3         10
>
> Category
>    id        title
>
>    10        Hiking
>    15        Walking
>    20        Family
>    30        Older
>
>
> The only value being passed into the query is the category title.
>
> I want to return the image id for images which are in ALL the categories I'm interested in - i.e., if the user selected 'Hiking', 'Family' and 'Older' then I want to see only image 1.  If the user selected 'Walking' and 'Older' I'd see only image 2.
>
> Can this be done in the model-based fetch-spec rather than having to build up qualifiers?
>
>
> Liz
>
>
>
> _______________________________________________
> 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


 _______________________________________________
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


References: 
 >Fetch spec capabilities (From: Elizabeth Lynch <email@hidden>)

  • Prev by Date: Fetch spec capabilities
  • Next by Date: Re: Ant built issue: The framework name 'ERJars' does not exist.
  • Previous by thread: Fetch spec capabilities
  • Next by thread: Re: Fetch spec capabilities
  • Index(es):
    • Date
    • Thread