BigDecimal precision not persisted with JPA annotations

限于喜欢 提交于 2019-12-04 03:25:05

I found the answer. Huzzah!

I attempted to execute the following query through the Oracle Apex interface:

alter table NODE modify (WEIGHTEDSCORE NUMBER(12, 9));

I received an error stating that a column containing data cannot be modified to have less precision or less scale. This was my issue!

Because I was attempting to alter table with existing data, I needed to either drop the table and re-initialize it, or alter the column to only have more precision and scale.

I attempted the following query with success:

alter table NODE modify (WEIGHTEDSCORE NUMBER(26, 9));

The reasoning is that I want to add 7 places of precision to the right of the decimal, so I am adding 7 to the overall precision to compensate for the increase in scale. That way, the column can keep all existing precision on the left of the decimal while adding precision on the right side.

It seems you're not the only one having trouble with this: http://www.eclipse.org/forums/index.php/m/716826/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!