5
5
namespace PDPhilip \OpenSearch \Eloquent ;
6
6
7
7
use Illuminate \Support \Str ;
8
- use PDPhilip \OpenSearch \Helpers \EloquentBuilder ;
9
8
use PDPhilip \OpenSearch \Relations \BelongsTo ;
10
9
use PDPhilip \OpenSearch \Relations \BelongsToMany ;
10
+ use PDPhilip \OpenSearch \Relations \EloquentBuilder ;
11
11
use PDPhilip \OpenSearch \Relations \HasMany ;
12
12
use PDPhilip \OpenSearch \Relations \HasOne ;
13
13
use PDPhilip \OpenSearch \Relations \MorphMany ;
@@ -317,7 +317,7 @@ public function morphedByMany(
317
317
) {
318
318
// If the related model is an instance of eloquent model class, leave pivot keys
319
319
// as default. It's necessary for supporting hybrid relationship
320
- if (Model::isOpenSearchModel ($ related )) {
320
+ if (Model::isOpenModel ($ related )) {
321
321
// For the inverse of the polymorphic many-to-many relations, we will change
322
322
// the way we determine the foreign and other keys, as it is the opposite
323
323
// of the morph-to-many method since we're figuring out these inverses.
@@ -345,7 +345,7 @@ public function morphedByMany(
345
345
*/
346
346
public function newEloquentBuilder ($ query )
347
347
{
348
- if (Model::isOpenSearchModel ($ this )) {
348
+ if (Model::isOpenModel ($ this )) {
349
349
return new Builder ($ query );
350
350
}
351
351
@@ -355,9 +355,9 @@ public function newEloquentBuilder($query)
355
355
protected function nonElasticModel ($ related , $ includingSelf = false ): bool
356
356
{
357
357
if ($ includingSelf ) {
358
- return ! Model::isOpenSearchModel ($ related ) && ! Model::isOpenSearchModel ($ this );
358
+ return ! Model::isOpenModel ($ related ) && ! Model::isOpenModel ($ this );
359
359
}
360
360
361
- return ! Model::isOpenSearchModel ($ related );
361
+ return ! Model::isOpenModel ($ related );
362
362
}
363
363
}
0 commit comments