2012-02-21 16 views
0

このエラーは、アプリケーションの重要な段階で発生します。 シナリオでは、MainViewは、述語 "User ==%@"、currentUserを使用してメインビューでエンティティ "Category"のリストを取得します。iCloud - コアデータ同期の問題

このページはicloud経由でデバイス間でよく同期されます。

ユーザーがいます< ----->カテゴリ< ---- >>フィールド< --------- >>エントリ(タイムスタンプ、値)。 < < ------------>ユーザー 唯一の違いは、エントリが異なるユーザーに属していることです。したがって、最後の関係。

私は、「エントリ」エンティティを追加して、ローカルに罰金作成されますが、ログは(のiCloud経由で)受信デバイスに到着したとき...私はこの得るか:私は同じを使用

2012-02-21 06:36:55.573 APPCloud[2403:4923] -[_PFUbiquityRecordsImporter operation:failedWithError:](839): CoreData: Ubiquity: Import operation ecountered an error: Error Domain=NSCocoaErrorDomain Code=134060 "The operation couldn’t be completed. (Cocoa error 134060.)" UserInfo=0x79ce410 {exception=Illegal attempt to establish a relationship 'forUser' between objects in different contexts (source = <Entry: 0x855eac0> (entity: Entry; id: 0x855e6b0 <x-coredata:///Entry/tDF69E4F8-35DE-4DC1-8077-F5A563FE0DCC1041> ; data: { comment = nil; 
    forField = nil; 
    forUser = nil; 
    period = 0; 
    timeStamp = nil; 
    value = 0; 
}) , destination = <User: 0x288820> (entity: User; id: 0x232a10 <x-coredata://43C097FE-4A91-42A9-B8EC-CF32D65F7328/User/p1> ; data: { 
    birthday = "1999-02-20 21:00:00 +0000"; 
    entries =  (
     "0x79aa590 <x-coredata:///Entry/tDF69E4F8-35DE-4DC1-8077-F5A563FE0DCC16>", 
     "0x2071d0 <x-coredata://43C097FE-4A91-42A9-B8EC-CF32D65F7328/Entry/p1>", 
     "0x206bf0 <x-coredata://43C097FE-4A91-42A9-B8EC-CF32D65F7328/Entry/p2>" 
    ); 
    firstName = Samuel; 
    fullName = nil; 
    height = 0; 
    images =  (
    ); 
    lastName = User; 
    male = 1; 
    trackers =  (
     "0x797bb60 <x-coredata://43C097FE-4A91-42A9-B8EC-CF32D65F7328/Tracker/p1>" 
    ); 
    uuid = "07110878-F6D3-482D-BC0E-3CE8B4A581E4HGMG"; 
    years = 0; 
}))} while trying to import the log file at the URL: <PFUbiquityTransactionLog: 0x79ca620> 

を文脈、私はここで何が起こっているのか知りません...これらのログが到着したら、他のstufの作品はありません..

正しい方向を教えてください!

おかげ

答えて

0

あなたがnilまたはプロパティのコンテキストにこれを追加していますか?ローカルプロパティのコンテキストを使用しないでください。

+0

確かに、私が追加したコンテキストは正しく初期化されていません。私のおかげで! – jasonIM