• 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: EOSortOrdering or ERXSortOrdering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOSortOrdering or ERXSortOrdering


  • Subject: Re: EOSortOrdering or ERXSortOrdering
  • From: getsharp <email@hidden>
  • Date: Mon, 6 Oct 2008 14:14:56 +1000

I guess I should have originally asked what error Eclipse gave you regarding your sortOrderings argument?

The following is a legitimate value for sortOrderings in your example:
new NSArray<EOSortOrdering>(new ERXSortOrdering("id",ERXSortOrdering.CompareDescending))


although it can be made cleaner using ERXS

sharpy..


On 06/10/2008, at 1:03 PM, WebObjects wrote:

aha... ok

but id is not a class property.. its the pk... :S ... why do I want them like that?...because the other class property its the name of the week, which its monday - sunday, but its repeated on the table, Im fetching all mondays... this was just to try out about the sort ordering... but I think after I fetch the Mondays I will get the turns related to each WorkDay and then I will order by time or something...




Gus

On Oct 5, 2008, at 9:53 PM, getsharp wrote:

Hi gus,

I would recommend use ERXKey for sort ordering.

EOSortOrdering order = WorkDay.ID.desc();
NSArray<EOSortOrdering> order = WorkDay.ID.descs();

assuming "id" is a class property.

sharpy..


On 06/10/2008, at 12:22 PM, WebObjects wrote:

Hello, well Im fetching some data, and I encounter here something, when I created the EOModel and generate the javaclases, I got a method :
public static NSArray<WorkDay> fetchWorkDaies(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) {
well, before I realize its third argument it;s a EOSortOrdering, I was tryin to send it a ERXSortOrdering, and then as you can imagine Eclipse complain about it, if this is wonder shouldn't use the ERXSortOrdering, what to do?


just use EOSortOrdering?, will I loss something using it instead of EOSortOrdering?

or from where I call the method I did this, knowing that EOSortOrdering its the supperclass of ERXSortOrdering.

NSArray<EOSortOrdering> order = new NSArray(new ERXSortOrdering("id",ERXSortOrdering.CompareDescending));

and the call the method fetchWorkDaies(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings)

well let me know if actually I can fetch and sort using the id.

thanks

gus



_______________________________________________
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: 
 >EOSortOrdering or ERXSortOrdering (From: WebObjects <email@hidden>)
 >Re: EOSortOrdering or ERXSortOrdering (From: getsharp <email@hidden>)
 >Re: EOSortOrdering or ERXSortOrdering (From: WebObjects <email@hidden>)

  • Prev by Date: Re: EOSortOrdering or ERXSortOrdering
  • Next by Date: Incorrectly Parsed Form Values in WOContext
  • Previous by thread: Re: EOSortOrdering or ERXSortOrdering
  • Next by thread: Incorrectly Parsed Form Values in WOContext
  • Index(es):
    • Date
    • Thread