Merge pull request #2498 from jkempff/fix-1

fixed wrong ID output for many_many and has_many relations
This commit is contained in:
Ingo Schommer 2013-10-10 04:10:16 -07:00
commit a0080dc921

View File

@ -97,7 +97,7 @@ class JSONDataFormatter extends DataFormatter {
$innerParts[] = ArrayData::array_to_object(array(
"className" => $relClass,
"href" => "$href.json",
"id" => $item->$fieldName
"id" => $item->ID
));
}
$serobj->$relName = $innerParts;
@ -118,7 +118,7 @@ class JSONDataFormatter extends DataFormatter {
$innerParts[] = ArrayData::array_to_object(array(
"className" => $relClass,
"href" => "$href.json",
"id" => $item->$fieldName
"id" => $item->ID
));
}
$serobj->$relName = $innerParts;