@@ -358,7 +358,7 @@ public function hasOne($model, ?string $ref = null)
358
358
} else {
359
359
$ table_name = $ model ;
360
360
$ join_ref = $ ref ?? $ this ->primery_key ;
361
- $ model = new Model ($ this ->pdo , []);
361
+ $ model = new static ($ this ->pdo , []);
362
362
}
363
363
$ result = MyQuery::from ($ this ->table_name , $ this ->pdo )
364
364
->select ([$ table_name . '.* ' ])
@@ -387,7 +387,7 @@ public function hasMany($model, ?string $ref = null)
387
387
} else {
388
388
$ table_name = $ model ;
389
389
$ join_ref = $ ref ?? $ this ->primery_key ;
390
- $ model = new Model ($ this ->pdo , []);
390
+ $ model = new static ($ this ->pdo , []);
391
391
}
392
392
$ result = MyQuery::from ($ this ->table_name , $ this ->pdo )
393
393
->select ([$ table_name . '.* ' ])
@@ -573,7 +573,7 @@ public function offsetExists($offset): bool
573
573
* @return mixed|null
574
574
*/
575
575
#[\ReturnTypeWillChange]
576
- public function offsetGet ($ offset )
576
+ public function offsetGet ($ offset ): mixed
577
577
{
578
578
return $ this ->getter ($ offset , null );
579
579
}
@@ -679,7 +679,7 @@ public static function equal($column_name, $value, MyPDO $pdo): static
679
679
/**
680
680
* Fetch all records.
681
681
*
682
- * @return ModelCollection<static< array-key, mixed> >
682
+ * @return ModelCollection<array-key, static >
683
683
*/
684
684
public static function all (MyPDO $ pdo ): ModelCollection
685
685
{
0 commit comments