Spring jpa spring.jpa.hibernate.ddl-auto:创建ORA-02000:缺少ALWAYS关键字

时间:2015-11-19 03:16:57

标签: java spring oracle hibernate jpa

当我使用spring-boot-starter-data-jpa并设置spring.jpa.hibernate.ddl-auto:create和我的实体这样

@Entity
public class BaseOnDoubleValue extends DoubleData {
    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name = "uuid",length = 40)
    private long uuid;
    private int baseid;

然后我得到了这样的恐怖

2015-11-19 11:07:02.438 ERROR 5876 --- [           main] org.hibernate.tool.hbm2ddl.SchemaExport  : HHH000389: Unsuccessful: create table base_on_double_value (uuid bigint generated by default as identity, baseid integer not null, date_time timestamp, error integer not null, id integer not null, quality smallint not null, base_value double, primary key (uuid))
2015-11-19 11:07:02.438 ERROR 5876 --- [           main] org.hibernate.tool.hbm2ddl.SchemaExport  : ORA-02000: missing ALWAYS keyword

你能帮我算一下吗?

1 个答案:

答案 0 :(得分:2)

我自己解决了这个问题。

我将此添加到application.properties

spring.jpa.database= oracle