diff --git a/src/Jenssegers/Mongodb/Relations/MorphTo.php b/src/Jenssegers/Mongodb/Relations/MorphTo.php index 704c472..5938f9e 100644 --- a/src/Jenssegers/Mongodb/Relations/MorphTo.php +++ b/src/Jenssegers/Mongodb/Relations/MorphTo.php @@ -31,7 +31,7 @@ protected function getResultsByType($type) $query = $instance->newQuery(); - return $query->whereIn($key, $this->gatherKeysByType($type))->get(); + return $query->whereIn($key, $this->gatherKeysByType($type, $instance->getKeyType()))->get(); } /**