2012-01-24 2 views
8

, 나는 오류가 설정되어CoreData는 관계가 전무하다 말, 컨텍스트를 저장하는 데 실패 - 그러나 확실히 내 CoreData 모델의 컨텍스트를 저장하려고하면

Unresolved error Error Domain=NSCocoaErrorDomain Code=1560 "The operation couldn’t be completed. (Cocoa error 1560.)" UserInfo=0x76924b0 {NSDetailedErrors=( "Error Domain=NSCocoaErrorDomain Code=1570 " The operation couldn\U2019t be completed. (Cocoa error 1570.)" UserInfo=0x768c410 {NSValidationErrorObject=<Posts: 0x7177990> (entity: Posts; id: 0x7177010 <x-coredata:///Posts/tEF7138E6-A968-45B7-95CF-116C2AA93D605> ; data: {\n " business_entity" = nil;\n "
created_at" = " 2012-01-21 03:31:30 +0000" ;\n " own_description" = " Roasted this morning- Panama Duncan Estate: A rose fragrance debuts flavors of pear, coconut and marshmallow with caramel throughout the cup." ;\n postsID = 4;\n " updated_at" = " 2012-01-21 03:31:30 +0000" ;\n}), NSValidationErrorKey=business_entity, NSLocalizedDescription=The operation couldn\U2019t be completed. (Cocoa error 1570.)}",

Key 부품의 존재 :

,691,363 : 나는 개체를 내 "게시물"을 만들 때

business_entity = nil;
NSValidationErrorKey=business_entity

그러나 나는 그들이하도록 설정210

저는 business_entity가 설정되고 있으며 올바른지 알고 있습니다. 그런 시나리오에서 컨텍스트를 저장할 때 오류를 발생시키는 원인은 무엇입니까? 그 도움이된다면

여기 모델의 :

enter image description here enter image description here

+0

is business_entity 관계 또는 속성> – jackslash

+0

그것은 관계입니다 - – Onedayitwillmake

답변

6

Incase의 사람이이 문제를 통해 오는 오류가 나는 coredatamodel의 관계를 설정 한 방법이었다.

이러한 이미지는, 그렇지 않으면 당신

enter image description here enter image description here

에 대한 동적으로 변경할 세트를 생성하지 않습니다, 내가 할 수있는 것보다 더 나은 설명하지만,이 일대 소유자 엔티티에서와 같이 관계를 설정 있는지 확인합니다