Context does not save the changes with error 1550

前端 未结 3 1890
别那么骄傲
别那么骄傲 2021-01-21 02:36

I\'m trying to update an entity and save the changes. I\'m getting always the following error:

The operation couldn’t be completed. (Cocoa error 1550.)
         


        
3条回答
  •  天涯浪人
    2021-01-21 03:26

    Explanation:

    NSValidationErrorObject= ...
    

    This is the object that you trying to save and validation failed for it

    NSValidationErrorKey=invitedUsers
    

    This is the attribute (relationship) that failed validation

    NSValidationErrorValue=Relationship 'invitedUsers' on managed object (0x11024aa0)
    

    What failed validation. Everything else is the list of the users in the relationship...

    I don't know your object model but for example the following seems to be wrong:

    invitedToEvents =     (
            "0x110abbb0 ",
            "0x166c0840 ",
            "0x110abba0 "
        );
    

    Note that one of the events is there twice (it has the same object id).

提交回复
热议问题