• 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
Core Data: How to find the NSPersistentStore of a managed object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data: How to find the NSPersistentStore of a managed object


  • Subject: Core Data: How to find the NSPersistentStore of a managed object
  • From: Peter Ferrett <email@hidden>
  • Date: Sun, 13 Sep 2009 12:24:51 +0100


Hi, I have a model that comprises two stores. 1. A read only store of a large data-set (this is read only as it is a public dataset shared among users) and 2. A read-write store that is the result of creation by user actions. One of my managed objects can belong to either store. During program execution I need to find the NSPersistentStore associated with the managed object. I thought this would be fairly straight forward, but cannnot find any method(s) in any of the Core Data docs on how to do this (I need to find the store because I am getting save errors when transient properties are changed on the read-only managed objects - one workaround is to send a refreshObject:mergeChanges method in the willSave: method if the object belongs to a read only store). Can anyone please point me in the right direction on how to find the store associated with a managed object.


Kind Thanks

Peter


_______________________________________________

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: Core Data: How to find the NSPersistentStore of a managed object
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: KVO can be unsafe in -init?
  • Next by Date: How to determine if a PDFPage is image based? (A scanned page)
  • Previous by thread: Re: How to display AboutBox window in Agent Application
  • Next by thread: Re: Core Data: How to find the NSPersistentStore of a managed object
  • Index(es):
    • Date
    • Thread