[b]Hibernate version:[/b] 3.2.1
The Oracle9Dialect always maps the float java type to the FLOAT database type, so any precision or scale information specified in the mapping file is lost.
If this is overridden to map to NUMBER($p,$s), then the precision and scale are mapped into the database correctly, but if none are specified then a default scale of 2 is inserted, which might also cause unexpected problems.
Would it be a useful enhancement for hibernate if numeric types could have multiple mappings depending on whether precision/scale are specified in the mapping file?
For example, the following property (with a java type of float) would map to a FLOAT database column, as is the current situation:
<property name="Area" />
But the following property, instead of also mapping to FLOAT, would map to NUMBER(10,3):
<property name="Area" precision="10" scale="3"/>
|