<!-- Zeichensatz -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Verwendete Versionen -->
- <hibernate.version>5.2.18.Final</hibernate.version>
+ <hibernate.version>5.3.9.Final</hibernate.version>
<el-api.version>3.0.1-b06</el-api.version>
<maven.version>3.6.0</maven.version>
<maven-plugin-log4j.version>1.0.1</maven-plugin-log4j.version>
Exhibition_id varchar(191) not null,
Exhibition_nodeType integer not null,
Exhibition_source VARCHAR(191) not null,
- close time,
+ close timestamp,
day integer,
- open time,
+ open timestamp,
type varchar(255)
);
Location_id varchar(191) not null,
Location_nodeType integer not null,
Location_source VARCHAR(191) not null,
- close time,
+ close timestamp,
day integer,
- open time,
+ open timestamp,
type varchar(255)
);
firstName varchar(255),
lastName varchar(255),
type varchar(255),
- end date,
- start date,
+ end timestamp,
+ start timestamp,
gemkey varchar(31),
generator varchar(255),
after varchar(255),
- date date,
+ date timestamp,
photographer_id varchar(191),
photographer_nodeType integer,
photographer_source VARCHAR(191),
<properties>
<!-- Skip artifact deployment -->
<maven.deploy.skip>true</maven.deploy.skip>
+ <hibernate-maven-plugin.version>@project.version@</hibernate-maven-plugin.version>
</properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>de.juplo</groupId>
+ <artifactId>hibernate-maven-plugin</artifactId>
+ <version>${hibernate-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <scanTestClasses>true</scanTestClasses>
+ <format>true</format>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
<!-- Database connection settings -->
<property name="connection.driver_class">org.h2.Driver</property>
- <property name="connection.url">jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE</property>
+ <property name="connection.url">jdbc:h2:${project.build.directory}/db/test;MVCC=TRUE</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
- <!-- Drop and re-create the database schema on startup -->
- <property name="hbm2ddl.auto">create</property>
-
<!-- Names the annotated entity class -->
<mapping class="org.hibernate.tutorial.annotations.Event"/>
<properties>
<!-- Skip artifact deployment -->
<maven.deploy.skip>true</maven.deploy.skip>
+ <hibernate-maven-plugin.version>@project.version@</hibernate-maven-plugin.version>
</properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>de.juplo</groupId>
+ <artifactId>hibernate-maven-plugin</artifactId>
+ <version>${hibernate-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <scanTestClasses>true</scanTestClasses>
+ <format>true</format>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
<!-- Database connection settings -->
<property name="connection.driver_class">org.h2.Driver</property>
- <property name="connection.url">jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE</property>
+ <property name="connection.url">jdbc:h2:${project.build.directory}/db/test;MVCC=TRUE</property>
<property name="connection.username">sa</property>
<property name="connection.password"/>
<properties>
<!-- Skip artifact deployment -->
<maven.deploy.skip>true</maven.deploy.skip>
+ <hibernate-maven-plugin.version>@project.version@</hibernate-maven-plugin.version>
</properties>
<dependencies>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>de.juplo</groupId>
+ <artifactId>hibernate-maven-plugin</artifactId>
+ <version>${hibernate-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <scanTestClasses>true</scanTestClasses>
+ <dialect>org.hibernate.dialect.H2Dialect</dialect>
+ <format>true</format>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
<properties>
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
- <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE" />
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:${project.build.directory}/db/test;MVCC=TRUE" />
<property name="javax.persistence.jdbc.user" value="sa" />
<property name="javax.persistence.jdbc.password" value="" />
<properties>
<!-- Skip artifact deployment -->
<maven.deploy.skip>true</maven.deploy.skip>
+ <hibernate-maven-plugin.version>@project.version@</hibernate-maven-plugin.version>
</properties>
<dependencies>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>de.juplo</groupId>
+ <artifactId>hibernate-maven-plugin</artifactId>
+ <version>${hibernate-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <scanTestClasses>true</scanTestClasses>
+ <dialect>org.hibernate.dialect.H2Dialect</dialect>
+ <format>true</format>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
<properties>
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
- <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE" />
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:${project.build.directory}/db/test;MVCC=TRUE" />
<property name="javax.persistence.jdbc.user" value="sa" />
<property name="javax.persistence.jdbc.password" value="" />
<version>1.0.0</version>
<packaging>bundle</packaging>
+ <properties>
+ <hibernate-maven-plugin.version>@project.version@</hibernate-maven-plugin.version>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
</instructions>
</configuration>
</plugin>
+ <plugin>
+ <groupId>de.juplo</groupId>
+ <artifactId>hibernate-maven-plugin</artifactId>
+ <version>${hibernate-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <url>jdbc:h2:mem:db_managed_jpa;MVCC=TRUE</url>
+ <format>true</format>
+ <execute>false</execute>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
<version>1.0.0</version>
<packaging>bundle</packaging>
+ <properties>
+ <hibernate-maven-plugin.version>@project.version@</hibernate-maven-plugin.version>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
</instructions>
</configuration>
</plugin>
+ <plugin>
+ <groupId>de.juplo</groupId>
+ <artifactId>hibernate-maven-plugin</artifactId>
+ <version>${hibernate-maven-plugin.version}</version>
+ <configuration>
+ <format>true</format>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
<properties>
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
- <property name="hibernate.connection.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE"/>
+ <property name="hibernate.connection.url" value="jdbc:h2:mem:db_unmanaged_jpa;DB_CLOSE_DELAY=-1;MVCC=TRUE"/>
<property name="hibernate.connection.username" value="sa"/>
<property name="hibernate.connection.password" value=""/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
</properties>
</persistence-unit>
-</persistence>
\ No newline at end of file
+</persistence>
<version>1.0.0</version>
<packaging>bundle</packaging>
+ <properties>
+ <hibernate-maven-plugin.version>@project.version@</hibernate-maven-plugin.version>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
</instructions>
</configuration>
</plugin>
+ <plugin>
+ <groupId>de.juplo</groupId>
+ <artifactId>hibernate-maven-plugin</artifactId>
+ <version>${hibernate-maven-plugin.version}</version>
+ <configuration>
+ <format>true</format>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.h2.Driver</property>
- <property name="hibernate.connection.url">jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE</property>
+ <property name="hibernate.connection.url">jdbc:h2:mem:db_unmanaged_native;DB_CLOSE_DELAY=-1;MVCC=TRUE</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
# See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
#
jdbc-0.proxool.alias=pool-one
-jdbc-0.proxool.driver-url=jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE
+jdbc-0.proxool.driver-url=jdbc:h2:mem:db_unmanaged_native;DB_CLOSE_DELAY=-1;MVCC=TRUE
jdbc-0.proxool.driver-class=org.h2.Driver
jdbc-0.user=sa
jdbc-0.password=
jdbc-0.proxool.maximum-connection-count=2
-jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE
\ No newline at end of file
+jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE
</testResource>
<testResource>
<directory>src/test/resources</directory>
+ <filtering>true</filtering>
</testResource>
</testResources>
</build>
--- /dev/null
+
+ create table EVENTS (
+ id bigint not null,
+ EVENT_DATE timestamp,
+ title varchar(255),
+ primary key (id)
+ );
--- /dev/null
+
+ create table EVENTS (
+ EVENT_ID bigint not null,
+ EVENT_DATE timestamp,
+ title varchar(255),
+ primary key (EVENT_ID)
+ );
--- /dev/null
+
+ create table EVENTS (
+ id bigint not null,
+ EVENT_DATE timestamp,
+ title varchar(255),
+ primary key (id)
+ );
--- /dev/null
+
+ create table EVENTS (
+ id bigint not null,
+ EVENT_DATE timestamp,
+ title varchar(255),
+ primary key (id)
+ );
+
+ create table EVENTS_AUD (
+ id bigint not null,
+ REV integer not null,
+ REVTYPE tinyint,
+ EVENT_DATE timestamp,
+ title varchar(255),
+ primary key (id, REV)
+ );
+
+ create table REVINFO (
+ REV integer generated by default as identity,
+ REVTSTMP bigint,
+ primary key (REV)
+ );
+
+ alter table EVENTS_AUD
+ add constraint FK5cembm6xahf542q8e4h0pq2t1
+ foreign key (REV)
+ references REVINFO;
--- /dev/null
+create sequence hibernate_sequence start with 1 increment by 1;
+
+ create table DataPoint (
+ id bigint not null,
+ name varchar(255),
+ primary key (id)
+ );
--- /dev/null
+create sequence hibernate_sequence start with 1 increment by 1;
+
+ create table DataPoint (
+ id bigint not null,
+ name varchar(255),
+ primary key (id)
+ );
--- /dev/null
+create sequence hibernate_sequence start with 1 increment by 1;
+
+ create table DataPoint (
+ id bigint not null,
+ name varchar(255),
+ primary key (id)
+ );
+
+ create table DataPoint_AUD (
+ id bigint not null,
+ REV integer not null,
+ REVTYPE tinyint,
+ name varchar(255),
+ primary key (id, REV)
+ );
+
+ create table REVINFO (
+ REV integer generated by default as identity,
+ REVTSTMP bigint,
+ primary key (REV)
+ );
+
+ alter table DataPoint_AUD
+ add constraint FK43jw6b5mtbfxur0xhyjxynbea
+ foreign key (REV)
+ references REVINFO;
--- /dev/null
+import de.juplo.test.FileComparator;
+
+
+FileComparator comparator = new FileComparator(basedir);
+
+if (!comparator.isEqual("schema-annotations.sql","annotations/target/create.sql"))
+ return false;
+if (!comparator.isEqual("schema-basic.sql","basic/target/create.sql"))
+ return false;
+if (!comparator.isEqual("schema-entitymanager.sql","entitymanager/target/create.sql"))
+ return false;
+if (!comparator.isEqual("schema-envers.sql","envers/target/create.sql"))
+ return false;
+if (!comparator.isEqual("schema-osgi-managed-jpa.sql","osgi/managed-jpa/target/create.sql"))
+ return false;
+if (!comparator.isEqual("schema-osgi-unmanaged-jpa.sql","osgi/unmanaged-jpa/target/create.sql"))
+ return false;
+if (!comparator.isEqual("schema-osgi-unmanaged-native.sql","osgi/unmanaged-native/target/create.sql"))
+ return false;