Java Hibernate为GenerationType.sequence中定义的序列创建表
我有以下代码用于实体生成序列Java Hibernate为GenerationType.sequence中定义的序列创建表,java,oracle,hibernate,Java,Oracle,Hibernate,我有以下代码用于实体生成序列 @Id @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="hotel_seq") @SequenceGenerator( name="hotel_seq", sequenceName="hotel_id_s" ) private Integer id; 当我运行应用程序时,hibernate尝试创建一个带有序列的表,但由于我使用的
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="hotel_seq")
@SequenceGenerator(
name="hotel_seq",
sequenceName="hotel_id_s"
)
private Integer id;
当我运行应用程序时,hibernate尝试创建一个带有序列的表,但由于我使用的是Oracle数据库,并且它不支持bigint数据类型,因此失败,出现以下异常
Invocation of init method failed; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [create table hotel_id_s (next_val bigint)]
有人能帮我吗?请检查数据库方言。这可能不是甲骨文。Oracle没有
bigint
数据类型。我已将下面的属性添加到hibernate.properties文件中。方言=org.hibernate.dialen.oraclealent。但我还是遇到了同样的问题。@MarmiteBomber我刚刚从org.hibernate.dialogue.oracleatulate替换为org.hibernate.dialogue.oracle10gdalue。在那之后,它工作了,谢谢你的帮助!!