CoreData relationship error

sometimes if you use coredata to store the data into database,you maybe caught this issue:

Illegal attempt to establish a relationship 'XXX' between objects in different context.

this issue is caused different manage context.so you must be initialize your database once more.

so as to fix this error,you should initial your database ONLY once,and every where all should use this database object.

Thanks,

Blues

你可能感兴趣的:(CoreData relationship error)