• 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: Order by primary key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Order by primary key


  • Subject: Re: Order by primary key
  • From: Kieran Kelleher <email@hidden>
  • Date: Thu, 12 Apr 2012 11:51:49 -0400

Depending on the database plugin you are using, you can set a fetchLimit on the fetchspec to limit the fetch at the SQL level.

On Apr 12, 2012, at 11:36 AM, Ken Anderson wrote:

This worked perfectly...I know using "id" is not ideal, but it is rough fix until I can do some revision to the architecture.

NSMutableArray<EOSortOrdering> ordering = new NSMutableArray<EOSortOrdering>();
EOSortOrdering byPK = new EOSortOrdering("id", EOSortOrdering.CompareDescending);
ordering.add(byPK);

NSArray<Address> allAddresses = Address.fetchPUPAddresses(ec, qualifier, ordering);

Ken Anderson
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: 
 >Order by primary key (From: Ken Anderson <email@hidden>)
 >Re: Order by primary key (From: Kieran Kelleher <email@hidden>)
 >Re: Order by primary key (From: Ken Anderson <email@hidden>)

  • Prev by Date: Re: Order by primary key
  • Next by Date: NullPointerException
  • Previous by thread: Re: Order by primary key
  • Next by thread: Interesting
  • Index(es):
    • Date
    • Thread