Note that there are some explanatory texts on larger screens.

plurals
  1. PO"CoreData does not support persistent cross-store relationships" despite matching x-coredata ids
    text
    copied!<p>When saving a Core Data managed object context on iOS 6.0.1 to a SQLite store, I run into a strange "CoreData does not support persistent cross-store relationships" exception. It concerns a one-to-one relationship between Quotes and AbstractSources in the model. At runtime it concerns a Quote and a Book (where Book inherits from AbstractSource. All works well in the model editor.)</p> <p>I've researched similar reports and covered the reported causes:</p> <ol> <li>I am assigning both the Quote and the Book to the same persistent store using assignObject:toPersistentStore:, so neither remains unassigned.</li> <li>The error description shows that all "absolute" x-coredata ids start with the same prefix (e.g. "x-coredata://82B3BEB3-60F2-4912-AC80-11AAD29CFF99/", so there really seems to be one store only in use.</li> </ol> <p>My questions are these:</p> <ol> <li>Is there anything else I have to check (perhaps sg. in relation to AbstractSource, which I do not touch/control in my source? I am creating both the Quote and the Book with a call to initWithEntity:insertIntoManagedObjectContext each.)</li> <li>I noticed that the error description also includes several "relative" x-coredata ids (of the form "x-coredata:///..."). Could it be that the absolute form is always considered as "cross-database", even if "absolute" prefixes (see example above) are the same? And if so, how could I influence any choice between "absolute" and "relative" x-coredata ids?</li> </ol> <p>Thx (much) for your attention!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload