Commit 67027a87 authored by Tobias Liese's avatar Tobias Liese

wip

parent 9a2e2cd4
Pipeline #101284 failed with stages
......@@ -16,7 +16,7 @@ dependencies {
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation 'io.quarkus:quarkus-resteasy'
implementation 'io.quarkus:quarkus-resteasy-qute'
implementation 'io.quarkus:quarkus-jdbc-h2'
implementation 'io.quarkus:quarkus-jdbc-postgresql'
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'io.rest-assured:rest-assured:4.2.0'
......
version: "3.8"
services:
database:
image: postgres
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: dev
POSTGRES_USER: root
POSTGRES_DB: dev
#Gradle properties
#Tue Feb 11 17:11:23 UTC 2020
quarkusPluginVersion=1.3.0.Final
quarkusPluginVersion=1.5.0.CR1
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=1.3.0.Final
quarkusPlatformVersion=1.5.0.CR1
quarkusPlatformGroupId=io.quarkus
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
......@@ -82,7 +82,7 @@ public class Automaton {
}
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
protected Long getId() {
return id;
}
......
......@@ -103,7 +103,7 @@ public class State {
}
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
public long getId() {
return id;
}
......
......@@ -5,9 +5,11 @@ import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
@Entity
@Table(name = "Users") // user is a keyword so we should avoid it
public class User {
private String name;
private long id;
......@@ -28,7 +30,7 @@ public class User {
}
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
protected long getId() {
return id;
}
......@@ -37,7 +39,7 @@ public class User {
this.id = id;
}
@OneToMany
@ManyToMany
protected List<Automaton> getAutomatons() {
return automatons;
}
......
# Configuration file
quarkus.datasource.url=jdbc:h2:tcp://localhost/~/test
quarkus.datasource.driver=org.h2.Driver
quarkus.datasource.username=sa
quarkus.datasource.db-kind = postgresql
quarkus.datasource.username = root
quarkus.datasource.password = dev
quarkus.datasource.jdbc.url = jdbc:postgresql://localhost:5432/dev
# drop and create the database at startup (use `update` to only update the schema)
quarkus.hibernate-orm.database.generation=update
\ No newline at end of file
quarkus.hibernate-orm.database.generation=drop-and-create
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment