• 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
CoreData questions: How to reset NSManagedObject, how to "Un-manage" an NSManagedObject.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData questions: How to reset NSManagedObject, how to "Un-manage" an NSManagedObject.


  • Subject: CoreData questions: How to reset NSManagedObject, how to "Un-manage" an NSManagedObject.
  • From: Motti Shneor <email@hidden>
  • Date: Wed, 23 Mar 2011 09:21:42 +0200

Hi.

1. When you create an NSManagedObject, it is initialized with default values defined in the model. How can I reset an existing NSManagedObject to these default values?

2. We have a multithreaded application, and we only keep one core-data context. Our network-related code receives data in a background thread, but is unable to write it to the model directly. So it saves it in some intermediate data object, and passes it to the main-thread for writing into the model.

I would like to use an NSManagedObject to replace the intermediate data object --- It is quite ugly to have duplicated model classes definition for everything. My question:

Can I somehow detach an NSManagedObject from its context, and use it in an "Unmanaged" way?
Hopefully I can later attach it to the context, or create another NSManagedOBject from its data?


Motti Shneor,
Spectrum Reflections LTD.
---
ceterum censeo microsoftiem delendam esse
---










_______________________________________________

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: CoreData questions: How to reset NSManagedObject, how to "Un-manage" an NSManagedObject.
      • From: Andreas Grosam <email@hidden>
  • Prev by Date: Re: NSOperation with unit test
  • Next by Date: Re: design question
  • Previous by thread: Re: NSOperation with unit test
  • Next by thread: Re: CoreData questions: How to reset NSManagedObject, how to "Un-manage" an NSManagedObject.
  • Index(es):
    • Date
    • Thread