• 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
Re: Creating temporary NSManagedObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating temporary NSManagedObjects


  • Subject: Re: Creating temporary NSManagedObjects
  • From: Hal Mueller <email@hidden>
  • Date: Wed, 28 Apr 2010 11:21:31 -0700

On Apr 27, 2010, at 10:42 AM, vincent habchi wrote:

> There is a simple reason: the objects in the Managed object context get "represented" on a third window, whose contents are drawn from an Entity mode NSArrayController that prepares its contents automatically. If I add my temporary object to the MOC, it automatically gets fetched and displayed in that window the very moment it is inserted; that's what I wanted to avoid because it is confusing and thus undesirable.

Use a separate MOC for your transient NSMO's. When you're finished, kill the MOC, without ever saving the changed (temporary, undesired) NSMO's to the PSC. Your scenario is a classic use case for multiple MOC's.

NSMO's are designed to live in MOC's. Seems like a very bad idea to try to get CD to do otherwise.

Hal

_______________________________________________

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

References: 
 >Creating temporary NSManagedObjects (From: vincent habchi <email@hidden>)
 >Re: Creating temporary NSManagedObjects (From: Quincey Morris <email@hidden>)
 >Re: Creating temporary NSManagedObjects (From: vincent habchi <email@hidden>)

  • Prev by Date: Re: awakeFromFetch Called Multiple Times
  • Next by Date: Re: NSCalendar date calculation anomaly
  • Previous by thread: Re: Creating temporary NSManagedObjects
  • Next by thread: CoreData validation question
  • Index(es):
    • Date
    • Thread