Actually, my question revolves around sorting a method that needs a parameter.

For instance, I have an EO with the calculated value:

totalOrderAmountByStore(Store store);

How would you notationally write a sort to sort those EOs by that method?

make sense?


On May 21, 2013, at 11:41 AM, Jesse Tayler <[email protected]> wrote:

> 
> 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 protected]> 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 protected])
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
>> 
>> This email sent to [email protected]
> 


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to