• 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
ERXSortOrderings ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERXSortOrderings ?


  • Subject: ERXSortOrderings ?
  • From: Theodore Petrosky <email@hidden>
  • Date: Tue, 14 Dec 2010 09:02:19 -0800 (PST)

Why does this work:

ERXSortOrderings newOrdering = ERXSortOrdering.sortOrderingWithKey("parentCompany.parentCompanyName", ERXSortOrdering.CompareAscending).then(Client.CLIENT_NAME.asc());

but this doesn't:

ERXSortOrderings newOrdering1 = ERXSortOrdering.sortOrderingWithKey(Client.PARENT_COMPANY.dot(ParentCompany.PARENT_COMPANY_NAME).asc()).then(Client.CLIENT_NAME.asc());

Here is the error: The method sortOrderingWithKey(String, NSSelector) in the type ERXSortOrdering is not applicable for the arguments (ERXSortOrdering.ERXSortOrderings)

ERXSortOrderings newOrdering2 = ERXSortOrdering.sortOrderingWithKey(Client.PARENT_COMPANY.dot(ParentCompany.PARENT_COMPANY_NAME).asc()).then(Client.CLIENT_NAME.asc());

ERXSortOrderings newOrdering2 = ERXSortOrdering.sortOrderingWithKey(ParentCompany.PARENT_COMPANY_NAME.asc().then(Client.CLIENT_NAME.asc());

As long as I start out with "string, selector" then I can chain - then, then, etc.

I must have some deep seated misunderstanding of ERXSortOrderings and how to create it.

this one works beautifully: (except on closer examination, I don't understand why it works with the parenthesis around the first element)

ERXSortOrderings newOrdering = ERXSortOrdering.sortOrderingWithKey("version.job.primaryKey", ERXSortOrdering.CompareAscending)
		.then(Invoice.VERSION.dot(Version.ITEM_INDEX).asc())
		.then(Invoice.VERSION.dot(Version.SUB_VERSION_NUMBER).asc())
		.then(Invoice.VERSION.dot(Version.REVISION_NUMBER).asc())
		.then(Invoice.INVOICE_DATE.asc() );


Ted




 _______________________________________________
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: ERXSortOrderings ?
      • From: Farrukh Ijaz <email@hidden>
    • Re: ERXSortOrderings ?
      • From: Mike Schrag <email@hidden>
  • Prev by Date: WebObjects / EOF and Timeouts on JDBC Connections
  • Next by Date: Re: ERXSortOrderings ?
  • Previous by thread: WebObjects / EOF and Timeouts on JDBC Connections
  • Next by thread: Re: ERXSortOrderings ?
  • Index(es):
    • Date
    • Thread