Core Data: How to find the NSPersistentStore of a managed object
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