Commit c751844a authored by Taylor Otwell's avatar Taylor Otwell

fixed belongs_to eager loading bug when parent does not exist.

parent 8f8c5f6d
......@@ -201,7 +201,10 @@ class Hydrator {
// -----------------------------------------------------
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];
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment