55namespace PDPhilip \OpenSearch \Eloquent ;
66
77use Illuminate \Support \Str ;
8- use PDPhilip \OpenSearch \Helpers \EloquentBuilder ;
98use PDPhilip \OpenSearch \Relations \BelongsTo ;
109use PDPhilip \OpenSearch \Relations \BelongsToMany ;
10+ use PDPhilip \OpenSearch \Relations \EloquentBuilder ;
1111use PDPhilip \OpenSearch \Relations \HasMany ;
1212use PDPhilip \OpenSearch \Relations \HasOne ;
1313use PDPhilip \OpenSearch \Relations \MorphMany ;
@@ -317,7 +317,7 @@ public function morphedByMany(
317317 ) {
318318 // If the related model is an instance of eloquent model class, leave pivot keys
319319 // as default. It's necessary for supporting hybrid relationship
320- if (Model::isOpenSearchModel ($ related )) {
320+ if (Model::isOpenModel ($ related )) {
321321 // For the inverse of the polymorphic many-to-many relations, we will change
322322 // the way we determine the foreign and other keys, as it is the opposite
323323 // of the morph-to-many method since we're figuring out these inverses.
@@ -345,7 +345,7 @@ public function morphedByMany(
345345 */
346346 public function newEloquentBuilder ($ query )
347347 {
348- if (Model::isOpenSearchModel ($ this )) {
348+ if (Model::isOpenModel ($ this )) {
349349 return new Builder ($ query );
350350 }
351351
@@ -355,9 +355,9 @@ public function newEloquentBuilder($query)
355355 protected function nonElasticModel ($ related , $ includingSelf = false ): bool
356356 {
357357 if ($ includingSelf ) {
358- return ! Model::isOpenSearchModel ($ related ) && ! Model::isOpenSearchModel ($ this );
358+ return ! Model::isOpenModel ($ related ) && ! Model::isOpenModel ($ this );
359359 }
360360
361- return ! Model::isOpenSearchModel ($ related );
361+ return ! Model::isOpenModel ($ related );
362362 }
363363}
0 commit comments