You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the primary key is not int it should be explicitly defined.
The explicit keytype is needed because Eloquent queries will otherwise assume the key is int.
For tables where the primary key is not integer, set: public $keyType = 'string';
It already sets the following: public $incrementing = false;
[Similar to #233 , but more generic]
If the primary key is not int it should be explicitly defined.
The explicit keytype is needed because Eloquent queries will otherwise assume the key is int.
For tables where the primary key is not integer, set:
public $keyType = 'string';
It already sets the following:
public $incrementing = false;
laravel/src/Coders/Model/Factory.php
Line 439 in 2fc69cb
It already detects if the primary key is not
int
:laravel/src/Coders/Model/Model.php
Line 842 in 2fc69cb
It detects the keytype, but not sure if we can / need to use that value.
I believe it can always be set to
string
if the primary key is notint
.The text was updated successfully, but these errors were encountered: