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

String does not evolve into BigDecimal

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Unknown
    • Resolution: Fixed
    • None
    • 9.0.0
    • None
    • None

    Description

      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.
       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: