ActiveRecord attributes binding after find

Hello all,

I have an ar model defined over a postgresql table. There is a field, weight that is stored as ‘real’ in database. After loading a record from db this field is retrieved as a php string instead of php double.

Example: in db I have 1.21 when loading it in the ar it is stored as "1.21" instead of 1.21.

Is this intendted behavior? If yes why? Because integers are converted to integers when fetched from db.

Thank you,

-soso

numeric data are represented with string in the AR…

check this thread - http://www.yiiframework.com/forum/index.php?/topic/9987-solved-postgresql-numeric-datatype-bug/page__fromsearch__1

Hi, it’s not numeric, it’s real, which is represented as double.

Any opionions guys? If not I will submit an official bug report.