spadefoot / kohana-orm-leap

An ORM module for the Kohana PHP framework that is designed to work with all major databases.
http://spadefoot.github.io/kohana-orm-leap/
100 stars 25 forks source link

using case insensitive column and table names in Oracle #92

Closed ansaus closed 11 years ago

ansaus commented 11 years ago

Hi! Is that possible to extend your lib to use lowercase names for columns and tables in oracle orm. Im going to write lots of models and it would be awefull to watch and use the models with UPPERCASE names that use much space in the code and take attention on themselves all the time ))

thanks

bluesnowman commented 11 years ago

Since case is enforced by the double quotation marks in Oracle, just override _CLOSING_QUOTECHARACTER and _OPENING_QUOTECHARACTER in Base_DB_Oracle_Precompiler and make them both empty strings. I believe that should allow you to do what you want to do.

ansaus commented 11 years ago

Thank you! I use version for kohana 3.2 found what you told about in expression.php Though I had to change array keys to lowercase manually in Base_DB_Oracle_Connection_Standard on line 141: $records[] = DB_Connection::type_cast($type, $this->_keysToLowerCase($record));

If not to do so it doesnt fill model properties in lowercase format

ansaus commented 11 years ago

I probably should extend the class and override functions