mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX JSONDataFormatter wrong relation identifiers (fixes #1795)
This commit is contained in:
parent
c8d98861c0
commit
b211f22bf9
@ -96,7 +96,7 @@ class JSONDataFormatter extends DataFormatter {
|
|||||||
$innerParts[] = ArrayData::array_to_object(array(
|
$innerParts[] = ArrayData::array_to_object(array(
|
||||||
"className" => $relClass,
|
"className" => $relClass,
|
||||||
"href" => "$href.json",
|
"href" => "$href.json",
|
||||||
"id" => $obj->$fieldName
|
"id" => $item->$fieldName
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
$serobj->$relName = $innerParts;
|
$serobj->$relName = $innerParts;
|
||||||
@ -117,7 +117,7 @@ class JSONDataFormatter extends DataFormatter {
|
|||||||
$innerParts[] = ArrayData::array_to_object(array(
|
$innerParts[] = ArrayData::array_to_object(array(
|
||||||
"className" => $relClass,
|
"className" => $relClass,
|
||||||
"href" => "$href.json",
|
"href" => "$href.json",
|
||||||
"id" => $obj->$fieldName
|
"id" => $item->$fieldName
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
$serobj->$relName = $innerParts;
|
$serobj->$relName = $innerParts;
|
||||||
|
Loading…
Reference in New Issue
Block a user