Update definition of an empty model.

This commit is contained in:
Robert Sworder 2013-10-25 15:12:03 +01:00
parent 8a90cbd4fe
commit 940a51b5fa

View file

@ -1398,7 +1398,7 @@ class DboSource extends DataSource {
if (isset($merge[$association])) {
$data[$association] = $merge[$association][0];
} else {
if (count($merge[0][$association]) > 1) {
if (!empty($merge[0][$association])) {
foreach ($merge[0] as $assoc => $data2) {
if ($assoc !== $association) {
$merge[0][$association][$assoc] = $data2;