• 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
Core data - getting fresh records
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core data - getting fresh records


  • Subject: Core data - getting fresh records
  • From: Steve Steinitz <email@hidden>
  • Date: Wed, 26 Sep 2007 19:27:49 +1000

Hello,

I have a Core Data point-of-sale application.   When it creates a new
Sale, it assigns it a human-readable, incrementing ID number.  For
better or worse, it calculates the ID by finding the maximum existing
value and adding 1.  It works well.  (Elsewhere it uses a more
conventional technique, like Core Data uses to generate primary keys.)

However, an external application may add a Sale to the SQLite
database.  Then, when my application looks for the maximum Sale ID it
may not see that externally-generated Sale -- it won't yet be
registered with its NSManagedObjectContext.

My question is, is there any way, short of writing SQL or doing
[managedObjectContext reset], that I can force a Sales fetch to go
directly to the SQLite database and not use the Sales in memory?

Thanks,

Steve
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Core data - getting fresh records
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: Tight Runloop
  • Next by Date: Re: Qustion about possibly bad advice in NSView documentation
  • Previous by thread: Re: Grabbing selected text in any app
  • Next by thread: Re: Core data - getting fresh records
  • Index(es):
    • Date
    • Thread