• 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: Sort Approach in Many to Many Subset
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sort Approach in Many to Many Subset


  • Subject: Re: Sort Approach in Many to Many Subset
  • From: Jesse Tayler <email@hidden>
  • Date: Tue, 21 May 2013 12:41:30 -0400

well, I'm not certain I understand your question but if your method derives that totalOrderAmount then you'd have to sort that in memory after getting a reasonable number of objects from another fetch.

often times in these situations I setup a kind of calculated integer and store the result right on the User table, as an integer, so I can order objects based on that result.

you'd need to identify the places (likely relationships) where operations might possibly change that number, and recalculate that result again at runtime -- again, you'd be storing and saving the resulting number on the user table for later sorting from the database.

or maybe your issue is something else?


On May 21, 2013, at 12:33 PM, James Cicenia <email@hidden> wrote:

>
> I have the following:
>
> customer <<---->> stores.
>
> I want the top five customers by order total for a store.
>
> I wrote a method:
>
> customer.totalOrderAmountByStore(Store store);
>
> What is the best way to sort that?
>
> Is there some cool ERXKEy? Make an abstract Entity in my Model?
>
> Wondering
> James
> _______________________________________________
> 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

  • Follow-Ups:
    • Re: Sort Approach in Many to Many Subset
      • From: James Cicenia <email@hidden>
References: 
 >Sort Approach in Many to Many Subset (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: known stable location for binary files like compiled WOAdaptor?
  • Next by Date: Re: Sort Approach in Many to Many Subset
  • Previous by thread: Sort Approach in Many to Many Subset
  • Next by thread: Re: Sort Approach in Many to Many Subset
  • Index(es):
    • Date
    • Thread