Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java PostgreSQL和Hibernate:已找到:数值,应为:int8_Java_Postgresql_Hibernate_Jpa - Fatal编程技术网

Java PostgreSQL和Hibernate:已找到:数值,应为:int8

Java PostgreSQL和Hibernate:已找到:数值,应为:int8,java,postgresql,hibernate,jpa,Java,Postgresql,Hibernate,Jpa,我在PostgreSQL中有一个表,其中包含类型为numeric(20)的列 我已将此列映射到类型为Long的字段上 验证部分hibernate给了我一个异常,说:Found:numeric,expected:int8。我无法更改数据库中列的类型,如何解决它?只需在列注释中添加列定义: @Column(name = "id", columnDefinition = "NUMERIC", length = 20)

我在PostgreSQL中有一个表,其中包含类型为
numeric(20)
的列

我已将此列映射到类型为
Long
的字段上


验证部分hibernate给了我一个异常,说:
Found:numeric,expected:int8
。我无法更改数据库中列的类型,如何解决它?

只需在列注释中添加
列定义

@Column(name = "id", columnDefinition = "NUMERIC", length = 20)