CakeDC / cakephp-oracle-driver

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

Driver's config is broken by empty $_defaultConfig #2

Closed hisame64 closed 8 years ago

hisame64 commented 8 years ago

In MySQL driver's behavior: $this->_config is initialized by $_baseConfig. e.g.) https://github.com/cakephp/cakephp/blob/master/src/Database/Driver/Mysql.php#L34

In this dirver's behavior: $this->_config is initialized by $_baseConfig, but $this->_config is overwrite by empty $_defaultConfig.

https://github.com/CakeDC/cakephp-oracle-driver/blob/master/src/Database/Driver/OracleBase.php#L31 https://github.com/CakeDC/cakephp-oracle-driver/blob/master/src/Config/ConfigTrait.php#L80 https://github.com/CakeDC/cakephp-oracle-driver/blob/master/src/Config/ConfigTrait.php#L244

; sorry, I can speak english little...

I want to use 'case' => 'lower' option, but I can't use bacause this problem.

https://github.com/CakeDC/cakephp-oracle-driver/blob/master/src/Config/ConfigTrait.php#L80 https://github.com/CakeDC/cakephp-oracle-driver/blob/master/src/Config/ConfigTrait.php#L244

I rewrite $this->_config = $this->_defaultConfig; to $this->_config = $this->_baseConfig;

Application run very well, but I can't judge this fix is good/bad..

skie commented 8 years ago

merged and fixed