• 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
sort returned entities by related entity attribute
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sort returned entities by related entity attribute


  • Subject: sort returned entities by related entity attribute
  • From: Jeff Schmitz <email@hidden>
  • Date: Sat, 05 Jul 2008 22:35:04 -0500

Hello,
   This is really hard to put down succinctly, so I'll try to do it a couple different ways:

   Is there an easy way to base the sort order of an array entities returned on an attribute of an entity related to each of the returned entities?

   IOW:

   startEntity to-many returnedEntity sorted by  returnedEntity to-one subEntity.sortKey.

Note that the returnedEntity owns, and propogates its primary key to, the subEntity.

e.g. This was basically my first try (I'm using wonder), but since I was applying a subEntity sort key on a returnedEntity array, it of course choked.

EOSortOrdering[] sortBy = {
new EOSortOrdering(subEntity.SORT_KEY,
EOSortOrdering.CompareDescending)};
NSArray<EOSortOrdering> sortByArray = new NSArray<EOSortOrdering>(
sortBy); // Sort

NSArray<Entry> entities = this.returnedEntity(null,
sortByArray, false);
Thanks!
Jeff
 _______________________________________________
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 returned entities by related entity attribute
      • From: Johann Werner <email@hidden>
  • Prev by Date: Context URLs Table
  • Next by Date: Re: sort returned entities by related entity attribute
  • Previous by thread: Re: Context URLs Table
  • Next by thread: Re: sort returned entities by related entity attribute
  • Index(es):
    • Date
    • Thread