0 Replies Latest reply on Nov 6, 2012 7:38 AM by Steve Zhang

    update_attributes() for  FixedSchema model will convert integer type to String type

      Now I found a strange issue,

      we define a Rhom model using fixed schema, and define one of the field type as integer,

      for example:

       

      class Product

        include Rhom::FixedSchema

        ...

         property :quantity, :integer 

        ...

       

      We found when we use create() method, the data will be saved and retrieved as integer,

      but when we use update_attribute() to store an integer value, but when we retrieve using Rhom, the value becomes String type

       

      For example

      Product.update_attributes("quantity" => 10)  will stored as "10" instead of 10 in the database,

       

      Can anybody provide some insight to solve this issue?

       

      Thanks