Skip to content

Commit

Permalink
Added code to make loading data for hasOne & belongsTo relationships …
Browse files Browse the repository at this point in the history
…to be set to an empty array when there's no matching relational data.
  • Loading branch information
rotimi committed Nov 27, 2024
1 parent d5e311b commit aba3a14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/LeanOrm/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@ protected function loadHasOne(
* @psalm-suppress MixedArrayOffset
* @psalm-suppress MixedArrayAssignment
* @psalm-suppress MixedArgument
* @psalm-suppress PossiblyInvalidArgument
*/
$parent_data[$p_rec_key][$rel_name] =
(\count($matching_related_rows) > 0)
Expand Down

0 comments on commit aba3a14

Please sign in to comment.