• 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: Fetchspec of average related field
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fetchspec of average related field


  • Subject: Re: Fetchspec of average related field
  • From: Alexander Spohr <email@hidden>
  • Date: Mon, 7 May 2007 19:30:43 +0000

Hey Drew,

You could create a VIEW that has the primary key of your item and the avarage of the ratings - if your DB supports VIEWs.

Then just have a new EOEntity (ItemAvarageRating) on that view and create a 1:1 relationship from item to ItemAvarageRating.

Fetch by sorting and limiting.... done.


atze

I love view-entities :)



Am 07.05.2007 um 12:20 schrieb Drew Thoeni:

I have two objects: Item and a to-many child, review.

Review has an attribute called rating.

I'm trying to use a fetchspec (which appears to be an impossibility) that returns the top 10 reviewed items. Basically, I'd like to sort by email@hiddeng and have only 10 items returned.

Is there a way to do this in EOModeler?

If not, I can return *all* item objects, sort by email@hiddeng, and create an array with only the top ten items in it. This seems like a lot of activity compared to allowing the database to only return the top 10 items.

Thoughts?

Regards,

Drew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40freeport.de


This email sent to email@hidden

Freeport & Soliversum Alexander Spohr email@hidden www.freeport.de


_______________________________________________ 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: Fetchspec of average related field
      • From: Florijan Stamenkovic <email@hidden>
    • Re: Fetchspec of average related field
      • From: Ken Anderson <email@hidden>
References: 
 >Fetchspec of average related field (From: Drew Thoeni <email@hidden>)

  • Prev by Date: SOLVED: Trying to create a dynamic url with the components action?
  • Next by Date: Re: Fetchspec of average related field
  • Previous by thread: Re: Fetchspec of average related field
  • Next by thread: Re: Fetchspec of average related field
  • Index(es):
    • Date
    • Thread