I have 2 table
Subscriptions Table
id char(36) | other column
Licenses Table
id bigint(20) | license_key (string) | subscription_id char(36)
Model Subscription.php
protected $with = ['licenses'];
public function licenses()
{
return $this->hasMany('App\License', 'subscription_id');
}
Eager Loading work for mostly case, but subscription_id = 6e20af64-81e6-428e-b9db-52317d1e478e
subscription_id = 6e20af64-81e6-428e-b9db-52317d1e478e
exist in Licenses Table
This is QueryLog:
array:2 [▼
0 => array:3 [▼
"query" => "select * from `subscriptions` where `subscriptions`.`id` = ? limit 1"
"bindings" => array:1 [▼
0 => "6e20af64-81e6-428e-b9db-52317d1e478e"
]
"time" => 3.9
]
1 => array:3 [▼
"query" => "select * from `licenses` where `licenses`.`subscription_id` in (9223372036854775807)"
"bindings" => []
"time" => 4.73
]
]
Why it does not work with only this subscription_id?
my env:
"laravel/framework": "6.20.17",
php: 7.4.14