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 9e4786c commit ebf5a38Copy full SHA for ebf5a38
src/Jenssegers/Mongodb/Helpers/QueriesRelationships.php
@@ -112,7 +112,11 @@ protected function getRelatedConstraintKey($relation)
112
return $relation->getForeignKey();
113
}
114
115
- throw new \Exception(class_basename($relation) . ' Is Not supported for hybrid query constraints!');
+ if ($relation instanceof BelongsToMany && ! $this->isAcrossConnections($relation)) {
116
+ return $this->model->getKeyName();
117
+ }
118
+
119
+ throw new \Exception(class_basename($relation) . ' is not supported for hybrid query constraints.');
120
121
122
/**
0 commit comments