Hibernate - BigDecimal column mapping for Custom Dialect

后端 未结 1 403
萌比男神i
萌比男神i 2020-12-19 02:15

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

1条回答
  •  悲哀的现实
    2020-12-19 03:08

    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.

    0 讨论(0)
提交回复
热议问题