Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5484

String does not evolve into BigDecimal

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 9.0.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Numeric strings should evolve into BigDecimal.
       
      The following does not work:
       
       

      class Band
        field :sales, type: BigDecmial
      end
      
      Band.create!(sales: BigDecimal(100))
      
      Band.where(sales: '100').count #=> 0  incorrect!

       
       
      Note that this works correctly for Integer, Float, etc. so it's clearly a bug.
       

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: