CakeDC / cakephp-oracle-driver

CakePHP 3 Driver for Oracle Database
Other
40 stars 25 forks source link

Lowercase column names #32

Closed juniorionut closed 4 years ago

juniorionut commented 5 years ago

Hello,

How can i get the result sets having the column names in lowercase as i can't find in the docs? At this point i am using an external method that uses array_map and applies array_change_key_case to the array. Thanks!

juniorionut commented 5 years ago

Hello, Found that out on my own, "CakePHP" MVC framework, inside the database configuration add the following declaration:

        'encoding'      => 'utf8',
        'timezone'      => 'UTC',
        'flags'         => [
            PDO::ATTR_CASE => PDO::CASE_LOWER
        ],
monsurhoq commented 1 year ago

@juniorionut after using PDO::ATTR_CASE => PDO::CASE_LOWER I'm getting below error:

Argument 1 passed to Cake\ORM\Entity::__construct() must be of the type array, bool given, called in \vendor\cakephp\cakephp\src\ORM\ResultSet.php on line 602
TypeError
[Documentation](https://book.cakephp.org/3/) [API](https://api.cakephp.org/)
Error in: ROOT\vendor\cakephp\cakephp\src\ORM\Entity.php, line 48