Extended integration-test "hib-test" to check for package-level annotations
authorKai Moritz <kai@juplo.de>
Sun, 15 Mar 2015 15:56:22 +0000 (16:56 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 15 Mar 2015 15:56:22 +0000 (16:56 +0100)
src/it/hib-test/h2.sql
src/it/hib-test/oracle.sql
src/it/hib-test/pom.xml
src/it/hib-test/postgres.sql
src/it/hib-test/src/main/java/de/juplo/plugins/hibernate4/tests/SimplestMavenHib4Test.java
src/it/hib-test/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java [new file with mode: 0644]

index 9569fa6..50da4e5 100644 (file)
@@ -4,6 +4,7 @@
     create table test_simple (
         uuid varchar(36) not null,
         content clob,
+        created timestamp,
         externalid varchar(148),
         sources varchar(255),
         primary key (uuid)
index c610b03..37ad107 100644 (file)
@@ -4,6 +4,7 @@
     create table test_simple (
         uuid varchar2(36 char) not null,
         content clob,
+        created timestamp,
         externalid varchar2(148 char),
         sources varchar2(255 char),
         primary key (uuid)
index 88dad6a..fe46e32 100644 (file)
       <artifactId>hibernate-core</artifactId>
       <version>4.3.0.Final</version>
     </dependency>
+    <dependency>
+      <groupId>org.jadira.usertype</groupId>
+      <artifactId>usertype.jodatime</artifactId>
+      <version>2.0.1</version>
+    </dependency>
+    <dependency>
+      <groupId>joda-time</groupId>
+      <artifactId>joda-time</artifactId>
+      <version>2.7</version>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
index 875da31..43c3d58 100644 (file)
@@ -4,6 +4,7 @@
     create table test_simple (
         uuid varchar(36) not null,
         content text,
+        created timestamp,
         externalid varchar(148),
         sources varchar(255),
         primary key (uuid)
index 3a3f565..3e64747 100644 (file)
@@ -7,6 +7,8 @@ import javax.persistence.Lob;
 import javax.persistence.Table;
 
 import org.hibernate.annotations.Index;
+import org.hibernate.annotations.Type;
+import org.joda.time.DateTime;
 
 @Entity
 @Table(name = "test_simple")
@@ -29,4 +31,7 @@ public class SimplestMavenHib4Test {
 
     @Column(name = "externalid", length=148)
     private String externalXyzId;
+
+    @Type(type = "joda")
+    private DateTime created;
 }
diff --git a/src/it/hib-test/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java b/src/it/hib-test/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java
new file mode 100644 (file)
index 0000000..23554cc
--- /dev/null
@@ -0,0 +1,2 @@
+@org.hibernate.annotations.TypeDef(name = "joda", typeClass = org.jadira.usertype.dateandtime.joda.PersistentDateTime.class)
+package de.juplo.plugins.hibernate4.tests;