We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2136f14 commit a897d1cCopy full SHA for a897d1c
src/Database/Eloquent/Relations/BelongsTo.php
@@ -52,9 +52,9 @@ protected function getEagerModelKeys(array $models)
52
// First we need to gather all of the keys from the parent models so we know what
53
// to query for via the eager loading query. We will add them to an array then
54
// execute a "where in" statement to gather up all of those related records.
55
- // Unlike other DB Engines FM does not support nulls and uses an empty string instead.
56
foreach ($models as $model) {
57
$value = $model->{$this->foreignKey};
+ // Unlike other DB Engines FM does not support nulls and uses an empty string instead.
58
if (! is_null($value) && $value !== '') {
59
$keys[] = $value;
60
}
0 commit comments