Database Exceptions

I have received these exceptions
“Exception: Argument 1 passed to Cake\ORM\Entity::__construct() must be of the type array, bool given, called in /app/vendor/cakephp/cakephp/src/ORM/ResultSet.php on line 603 in [/app/vendor/cakephp/cakephp/src/ORM/Entity.php, line 48]”
and
“Warning Error: array_combine(): Both parameters should have an equal number of elements in [/app/vendor/cakephp/cakephp/src/ORM/ResultSet.php, line 529]”

this issue is occured because my table field length is greater than 65. So, below $row variable contain truncated column name.
$row = $this->_statement->fetch(‘assoc’);
And failded to combine at
array_combine($keys, array_intersect_key($row, $keys));

Why are you not using the Query builder? it’s a lot easier to use :slight_smile:

I am using query builder but this exceptions pointing error in ResultSet.php file.:slight_smile:

Your error indicates something it wrong here (at least, that is my guess considering it’s the only plausible thing with the info we get):

Would you mind showing more of your code?

This is my database calls.
$entities = $termObj->patchEntities ( $termObj, $updateArray );
$termObj->saveMany ( $entities );

I take it $termObj is your model and $updateArray is your data?

Yes, you are correct.:slightly_smiling_face: