PHP Version
8.4
CodeIgniter4 Version
4.6.3
CodeIgniter4 Installation Method
Composer (using codeigniter4/appstarter)
Which operating systems have you tested for this bug?
macOS
Which server did you use?
apache
Database
MariaDB 10.4.28
What happened?
When using Model->insert() command, casting (eg. converting of array type to json encoded array) happens. But when using Model->insertBatch() command, casting of each row doesn't happen.
Steps to Reproduce
Create a table with atleast one column that stores json encoded values (i.e, of type TEXT, MEDIUMTEXT, LONGTEXT, etc.). Inside model, set the $cast of that column to type array. Then, fire up Model->insertBatch() command and for each row, pass an array (not string) for that model. The insert command will not insert values to DB.
Expected Output
The insertBatch should perform the casting on each row similar to that done in insert command.
Anything else?
I think I can contribute this but I don't know where to start. I mean, are there any specific things I need to setup before/after making changes or other things like that or just sending PR containing signed commits would suffice?
PHP Version
8.4
CodeIgniter4 Version
4.6.3
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter)Which operating systems have you tested for this bug?
macOS
Which server did you use?
apache
Database
MariaDB 10.4.28
What happened?
When using
Model->insert()command, casting (eg. converting of array type to json encoded array) happens. But when usingModel->insertBatch()command, casting of each row doesn't happen.Steps to Reproduce
Create a table with atleast one column that stores json encoded values (i.e, of type TEXT, MEDIUMTEXT, LONGTEXT, etc.). Inside model, set the
$castof that column to typearray. Then, fire upModel->insertBatch()command and for each row, pass an array (not string) for that model. The insert command will not insert values to DB.Expected Output
The
insertBatchshould perform the casting on each row similar to that done ininsertcommand.Anything else?
I think I can contribute this but I don't know where to start. I mean, are there any specific things I need to setup before/after making changes or other things like that or just sending PR containing signed commits would suffice?