Boolean values with Oracle?


#1

Oracle has no boolean value type, so how do i treat fields as being
boolean in activerecord?? I know i could rewrite the accessor methods in
the model class to return the correct boolean value, but this seems too
tedious and wrong.

Does anyone know a better way??

Any help is greatly appreciated,
Thanks,
Chris


#2

On 08/02/06, Chris removed_email_address@domain.invalid wrote:

Oracle has no boolean value type, so how do i treat fields as being
boolean in activerecord?? I know i could rewrite the accessor methods in
the model class to return the correct boolean value, but this seems too
tedious and wrong.

Does anyone know a better way??

ActiveRecord does the mapping automatically for you. Just make sure to
create your ‘boolean’ column as NUMBER(1).