fixed belongs_to eager loading bug when parent does not exist.
This commit is contained in:
parent
8f8c5f6dd4
commit
c751844aab
|
@ -201,7 +201,10 @@ private static function eagerly_load_belonging($relationship, &$parents, $relati
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
foreach ($parents as &$parent)
|
foreach ($parents as &$parent)
|
||||||
{
|
{
|
||||||
$parent->ignore[$include] = $children[$parent->$relating_key];
|
if (array_key_exists($parent->$relating_key, $children))
|
||||||
|
{
|
||||||
|
$parent->ignore[$include] = $children[$parent->$relating_key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue