Hi Dan, According to http://dev.mysql.com/doc/refman/5.0/en/precision-math-numbers.html, scientific notation is considered a approximate value numeric literal by MySQL (and possibly SQLite). As you mentioned, DO should convert the BigDecimal to a String using #to_s("F") so that a exact value numeric literal is used.
Regards, Arthur 2012/4/15 Dan Kubb (dkubb) <[email protected]> > Hi Arthur, > > > So, is possible a new property, that inherit of Decimal, but, on save it >> execute to_i.to_s ? >> > > Sure, check out some of the types in dm-types to see how you make custom > types. > > I haven't tested it, but I'm guessing you'll be able to implement this > type in probably no more than 5-10 lines of code. > > -- > > Dan > > -- > You received this message because you are subscribed to the Google Groups > "DataMapper" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/datamapper/-/u7HgcKDUY0EJ. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/datamapper?hl=en. > -- ------------------------------------------ 1. Notebook para você ficar livre e programar a vontade: R$ 2300 2. Curso de Programação/SysAdmin/DBA: R$ 5000 3. Pedir a solução pronta para um problema numa lista de discussão: Não tem preço ! E para todas as outras existe RTFM, STFW e LMGTFY -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
