Re: Core data - getting fresh records
Re: Core data - getting fresh records
- Subject: Re: Core data - getting fresh records
- From: "Clint Shryock" <email@hidden>
- Date: Wed, 26 Sep 2007 07:07:38 -0500
does this help?
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdUsingMOs.html#//apple_ref/doc/uid/TP40001803-208900
+Clint
On 9/26/07, Steve Steinitz <email@hidden> wrote:
>
> 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
>
_______________________________________________
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