diff --git a/src/ORM/Association/BelongsToMany.php b/src/ORM/Association/BelongsToMany.php index 201e4821a02..41b616093a7 100644 --- a/src/ORM/Association/BelongsToMany.php +++ b/src/ORM/Association/BelongsToMany.php @@ -1272,7 +1272,8 @@ protected function _buildQuery($options) $query ->where($this->junctionConditions()) ->select($joinFields) - ->defaultTypes($types); + ->defaultTypes($types) + ->addDefaultTypes($this->target()); $query ->eagerLoader()