Re: Temporary object created at runtime with Core Data
Re: Temporary object created at runtime with Core Data
- Subject: Re: Temporary object created at runtime with Core Data
- From: Greg Herlihy <email@hidden>
- Date: Mon, 24 Apr 2006 16:47:45 -0700
- Thread-topic: Temporary object created at runtime with Core Data
Creating a Core Data "configuration" for the entities of the temporary
objects (in XCode) and then creating an in-memory store for that
configuration (at runtime) would prevent the temporary objects from being
saved to the SQL store. Furthermore I would also mark all relationships to
the temporary objects as "transient" so that no references to the temporary
objects are stored in the database.
See the Core Data Programming guide for more information on CD
configurations and stores.
Greg
On 4/24/06 3:59 PM, "Eric Morand" <email@hidden> wrote:
> Hi guys !
>
>
> I'm developping an application that uses a sidebar which will
> contains some smart groups (an entity named "SmartGroup"). I'd like
> some of theses smart groups to be fixed, just like the first iTunes
> sources (Podcasts, Party Shuffle...) : they can't be deleted,
> modified or moved by the user.
> I believe there is no need to save them in the database. I'd rather
> create them at run-time.
>
> Since I don't want them to be stored in my SQLite database, I have a
> problem : how can I insert temporary objects in my managed context ?
>
> I'm nearly certain I need to use a memory store for that kind a
> thing, but I can't put my finger on the best way to implement it. Is
> this possible to have some objects inserted in an in memory store and
> some others in the SQLite database - while using the same context ?
>
>
>
> Eric.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden