summaryrefslogtreecommitdiff
path: root/myapp/src/main/java
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-08-04 12:34:48 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-08-04 12:34:48 +0200
commit3d556bfcad3eb3face9db986aa570d6e2a059448 (patch)
tree6b1b47390c16edd24a6f23d5183f6a0301043dcb /myapp/src/main/java
parentc0c9c358e8703c1af917d7270adbb04160ad34b3 (diff)
downloadcontainer-playground-3d556bfcad3eb3face9db986aa570d6e2a059448.tar.gz
container-playground-3d556bfcad3eb3face9db986aa570d6e2a059448.tar.bz2
container-playground-3d556bfcad3eb3face9db986aa570d6e2a059448.tar.xz
container-playground-3d556bfcad3eb3face9db986aa570d6e2a059448.zip
wip
Diffstat (limited to 'myapp/src/main/java')
-rw-r--r--myapp/src/main/java/io/trygvis/container/myapp/AddressBook.java3
-rw-r--r--myapp/src/main/java/io/trygvis/container/myapp/Person.java2
2 files changed, 5 insertions, 0 deletions
diff --git a/myapp/src/main/java/io/trygvis/container/myapp/AddressBook.java b/myapp/src/main/java/io/trygvis/container/myapp/AddressBook.java
index ec0bffa..0120b6a 100644
--- a/myapp/src/main/java/io/trygvis/container/myapp/AddressBook.java
+++ b/myapp/src/main/java/io/trygvis/container/myapp/AddressBook.java
@@ -87,6 +87,9 @@ public class AddressBook {
public void run(Connection c) throws Exception {
Statement statement = c.createStatement();
statement.executeUpdate(PersonDao.createTableSql);
+ for (String sql : Sequences.sequences) {
+ statement.executeUpdate(sql);
+ }
}
}
diff --git a/myapp/src/main/java/io/trygvis/container/myapp/Person.java b/myapp/src/main/java/io/trygvis/container/myapp/Person.java
index 6a7a694..be9026a 100644
--- a/myapp/src/main/java/io/trygvis/container/myapp/Person.java
+++ b/myapp/src/main/java/io/trygvis/container/myapp/Person.java
@@ -2,8 +2,10 @@ package io.trygvis.container.myapp;
import javax.persistence.Entity;
import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
@Entity
+@SequenceGenerator(name = "id_seq")
public class Person {
@Id
public Long id;