• 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: Amedeo Mantica <email@hidden>
  • Date: Thu, 12 Apr 2012 09:08:02 +0200

Yes
I agree with Jesse

Override awakeFromInsertion to set a creation date and validateForSave to set modification date

Sent from my iPhone

On 12/apr/2012, at 04:39, Jesse Tayler <email@hidden> wrote:

assuming you don't know the key you are specifically searching for, unordered results will likely return in order of the database, but I'm quite certain that is not reliable over time.

I typically insert a created or adjusted date which can simply be called during save?

your circumstances may vary according to needs!

maybe others have ideas or suggestions 

On Apr 11, 2012, at 10:29 PM, Ken Anderson <email@hidden> wrote:

Is there a way to sort a fetch result by primary key? I just need to access the latest object (order desc).

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: Jesse Tayler <email@hidden>)

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