Re: CoreData: How to do Transient Entities?
Re: CoreData: How to do Transient Entities?
- Subject: Re: CoreData: How to do Transient Entities?
- From: Lee Morgan <email@hidden>
- Date: Fri, 20 May 2005 04:46:55 -0400
On May 20, 2005, at 4:38 AM, mmalcolm crawford wrote: On May 20, 2005, at 1:12 AM, Lee Morgan wrote:
I've got some CoreData entities (~1000) that are worthless after my application quits.
Presumably you mean that you have about a thousand instances of a particular entity that are unneeded?
Well it's really two entities that total about 1000 instances at times. And yes they are completely worthless after quitting. Setting all the entity's attributes as transient doesn't work as I need; since the number of entities varies also.
This is confusing, even assuming the interpretation above.
Sorry. What I meant was that simply setting the entity's attributes to be transient doesn't suffice for my problem. Any advice on how to go about making a select few entities transient?
Prior to saving, fetch the instances of the unwanted entity, and delete them.
Thats what I was thinking I would have to do... Considering their ALL of the same two entities, this shouldn't be that hard of a task. Should I keep an array around of the NSManagedObjects that I wish to delete before saving? Or is there an easy way to get every managed object of a specific entity?
Thanks, Lee |
_______________________________________________
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