I have connected to the oracle db using ActiveRecord and am
trying to retrieve tuples. I have one attribute that has datatype
‘number(1)’. I found that ActiveRecord maps this attribute to boolean.
So it gets a class of either FalseClass or TrueClass. I tried to find
the source of the problem and I found oracle_adapter.rb (http://
has a method ‘simplified_field’ that has a line
“return :boolean if OracleAdapter.emulate_booleans && field_type ==
I tried overriding this method on my environment.rb and commented out
this line. This problem is solved but I have another field of type
‘Interval’ which has to get mapped to String, but instead gets mapped
to Fixnum when i do this override. Anyone got a clue what’s happening.
It would even be useful if anyone told me how to update the database
using ActiveRecord::update() and just by pure sql command.