I\'m using Hibernate as our Object-Relational Mapping, with a custom dialect for an obscure database.
The Entity I\'m retrieving from this database has a column thus
OK, after downloading the Hibernate sources, and stepping thru them with the debugger in NetBeans, I discovered that the problem lay in the proprietary JDBC driver's ResultSet sub-class, not in Hibernate.
The getBigDecimal method was always returning a value with a scale of 0.
When I contacted the developer of the JDBC driver, he spotted the bug and fixed it.