I have been using ORM tools/code generators and I see that they prefer using decimal to int values when mapping columns to properties. Is there any advantage of using decimal ?
The column type in database is the default Number which created as Number(38, 0) I believe.
NUMBERisNUMBER(38), which has far larger possible range thanint(Int32) (and much larger thanlong, too).doublehas different rounding semantics, sodecimalis preferred to avoid errors and issues. If the ORM can guarantee that the data fits insideint, it might be happier to useint.