Skip to content

Commit

Permalink
Merge pull request #314 from berarma/fix-relations
Browse files Browse the repository at this point in the history
Fix using default relations
  • Loading branch information
ADmad authored Apr 21, 2023
2 parents 2a35f2c + f257000 commit 3911ba0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Listener/ViewListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function beforePaginate(EventInterface $event): void
}

if (!$event->getSubject()->query->getContain()) {
$event->getSubject()->query->contain($this->_getRelatedModels(['manyToOne', 'oneToOne']));
$event->getSubject()->query->contain($this->_getRelatedModels(['belongsTo', 'hasOne']));
}
}

Expand Down

0 comments on commit 3911ba0

Please sign in to comment.