-
-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Description
Hello!
Possibly related to #105
I have a HasOne relation:
class Run extends Model
{
use \Awobaz\Compoships\Compoships;
/** @return AwobazHasOne<Settings, $this> */
public function settings(): AwobazHasOne
{
return $this->hasOne(
Settings::class,
['item_id', 'coil_width'],
['item_id', 'coil_width'],
);
}
}
After a very tricky bug, I found that eager loading the relation causes it to be loaded as null
despite the relation existing:
Run::firstOrFail()->settings; // exists
Run::with('settings')->firstOrFail()->settings; // does NOT exist
Metadata
Metadata
Assignees
Labels
No labels