Closed tobya closed 1 year ago
This seems to be an issue related to Doctrine's way of detecting column types.
Doctrine automatically detects a MySQL tinyint
column as Boolean
so there's no way for us to figure out if a column is an actual boolean or a tiny integer.
As a workaround, you can add a custom int
casting to the affected model:
protected $casts = [
'tinyint' => 'int',
];
Operating system
Windows 10
Laravel Version
v8.12
PHP Version
8.0
Project Location
Remote (Server)
Bug description
the field on my mysql table which is defined as a tinyint is being interpreted as a boolena
I use values 1 - 20 to specify differnt things, they should not be considered boolean.
Steps to reproduce
Create a tabel with a field type of tinyint
invoker will interpert it as a boolean
Relevant log output
No response