Hi all, Core Data is giving me a validation error when I try to save a document after making a simple change.
I have an entity 'Scene' with a to-many relationship to an entity 'Target'. The inverse relationship is also to-many. Both relationships are optional and the delete rule for both sides is nullify. To repro, I delete all Scenes then try to save. It gives: "Dangling reference to an invalid object." = <null>; NSAffectedObjectsErrorKey = ( <BSScene: 0x2004ff940> (entity: Scene; id: 0x2004f32a0 <x-coredata:// FCE3E0E3-F187-4C44-BFC3-60D7AF3E579F/Scene/p343> ; ... This error gives only 4 hits with Google. :( The problem is that some Targets still have relationships to some Scenes! How can that happen? It seems like the delete rule is not doing its job. I've confirmed that each Scene receives prepareForDeletion. None of the Scenes are finalized, they are all strongly referenced by the moc's _deletedObjects ivar. Any advice on how to debug this? (I can repro this with 2 customer-provided documents, but I've not been able to create a document with this problem myself. Happens on 10.5.8 and 10.6.1; my app is garbage collected.) Thanks, -- ____________________________________________________________ Sean McBride, B. Eng s...@rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com