0

When I used spring-boot-starter-data-jpa and I set spring.jpa.hibernate.ddl-auto:create and my entity like this

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

then I got a eror like this

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

Can you help me figure it?

  • Using [hmb2ddl.auto is the root of all evil](http://stackoverflow.com/questions/673802/how-to-import-initial-data-to-database-with-hibernate/22572463#22572463) ;) You honestly should read that, since you need to understand what happens under the hood and why you should use a proper tool for database change management right away. – Markus W Mahlberg Nov 19 '15 at 10:05
  • @MarkusWMahlberg I thought it works for me. I want a self-sufficient project that can work in a docker container. I do not want to execute a sql in a container (that means terrible ) And Thank you for give me this suggestion, I will avoid using this on production env. – SaintKnight Nov 20 '15 at 07:11
  • Liquibase will be executed from within your application.... During initialization... – Markus W Mahlberg Nov 20 '15 at 08:44

1 Answers1

2

I fix this problem by myself.

I add this to application.properties

spring.jpa.database= oracle