That's actually how I eventually managed to work out that it appeared to be a 
subclass/subentity thing. It got picked up on validateForInsert when I was 
doing a Save As, and I checked the objects, and they all seemed fine.

But this actually gives me an idea for a bit more testing that I can do - I'll 
get the inserted, updated and deleted objects from the managed object context 
and run the validation on them at some different points in my program to see if 
there is something else going on that could be affecting it.

Regards

Gideon

On 30/09/2010, at 9:22 AM, Quincey Morris wrote:

> On Sep 29, 2010, at 15:30, Gideon King wrote:
> 
>> Sorry, I should have been clearer. It is a sub-entity which is implemented 
>> as a subclass.
> 
> Hmm. I'd suspect a limitation of delete cascading rules, but that doesn't 
> really fit with the error message your reported. Was that error text exactly 
> what was displayed? It appeared when *saving*, yes (as opposed to setting the 
> relationship)?
> 
> If the inverse is in fact being set to an invalid object, I'd take a look at 
> the way the subclass object is being created. If that's not fruitful, ...
> 
> It's also possible to override some validation methods (see 
> http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdValidation.html%23//apple_ref/doc/uid/TP40004807-SW3).
>  In your override, you could call the super implementation first and break if 
> that fails. That would let you inspect the objects and relationships involved.
> 

_______________________________________________

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

Reply via email to