Core data - getting fresh records
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