0
"Allocation":{

"UserID":"8bc2df34-b77a-4889-a2ab-559e24cc2d40",

"Answers": 
{
"SurveyInstanceAnswerID":"cb924a6a-ad61-4786-b5fb-00302c4fc7dc",
"SurveyInstanceAllocationID":"42e96cec-5a00-416c-8a96-488ab152e4f5",
"AllocationUniqueRef":"1ce53cdf-b33e-4594-a938-b60656b8b64c",
"SurveyContentID":"ccd07464-9718-4953-8e51-ad25fa00e053",
"AnswerValue":null,
 }
}

我有两个类分配回答userID和。answervalueuserID

我想在答案类中映射userid分配中的存在。userid

rkEntitymapping用来映射对象

4

1 回答 1

1

If you use the current development branch (at the time of writing this feature hasn't been merged back to the master branch) you can use metadata to access the parent object during the mapping process:

@metadata.mapping.parentObject

So you can add a mapping:

@"@metadata.mapping.parentObject.UserID" : @"userId"
于 2013-08-28T12:05:52.513 回答