We also noticed this - logged here: https://github.com/orientechnologies/orientdb/issues/3596
N On Mon, Feb 16, 2015 at 6:45 AM, Gregor Frey <[email protected]> wrote: > Hi, > When I insert numbers into a decimal field the value is rounded, even if I > have only 9 digits. A value of 1799999.99 is rounded up to 1800000.0. For > financial arithmetics this seems to to be a showstopper, isn't it? Is there > anything I can do to increase the precision? > Ciao > Gregor > > > Here is my simple example: > > > orientdb {db=db}> create class Test extends V > > > Class created successfully. Total classes in database now: 12 > > > orientdb {db=db}> create property Test.Salary DECIMAL > > > Property created successfully with id=1 > > > orientdb {db=db}> info class Test > > > Class................: Test > > Super class..........: V > > Default cluster......: test (id=12) > > Supported cluster ids: [12] > > Cluster selection....: round-robin > > PROPERTIES > > > -------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+ > > NAME | TYPE | LINKED TYPE/CLASS > | MANDATORY | READONLY | NOT NULL | MIN | MAX | COLLATE | > > > -------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+ > > Salary | DECIMAL | null > | false | false | false | | | default | > > > -------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+ > > orientdb {db=db}> insert into Test set Salary = 1799999.99 > > > Inserted record 'Test#12:0{Salary:1800000.0} v1' in 0.007000 sec(s). > > > orientdb {db=db}> browse Test > > > !Unrecognized command: 'browse Test' > > orientdb {db=db}> browse class Test > > > ----+-----+------+--------- > > # |@RID |@CLASS|Salary > > ----+-----+------+--------- > > 0 |#12:0|Test |1800000.0 > > ----+-----+------+--------- > > orientdb {db=db}> > > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
