changeset 1234:28a39466e4eb

Enable deserialization of geometries with DBUnit.
author Tom Gottfried <tom@intevation.de>
date Tue, 13 Dec 2016 17:24:06 +0100
parents 6ef05e62e3b3
children 563c7d18c45f
files Dockerfile src/test/resources/arquillian.xml src/test/resources/datasets/dbUnit_ort.json
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Dockerfile	Tue Dec 13 16:42:41 2016 +0100
+++ b/Dockerfile	Tue Dec 13 17:24:06 2016 +0100
@@ -64,6 +64,9 @@
        $JBOSS_HOME/modules/org/postgres/main/module.xml
 RUN ln -fs $PWD/wildfly/hibernate-module.xml \
        $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/module.xml
+# The jdbcadapters need to know the postgres module to cope with PGeometry
+RUN sed -i '/<\/dependencies>/i         <module name="org.postgres"/>' \
+    $JBOSS_HOME/modules/system/layers/base/org/jboss/ironjacamar/jdbcadapters/main/module.xml
 RUN ln -fs $PWD/wildfly/standalone.conf $JBOSS_HOME/bin/
 
 RUN wildfly/execute.sh
--- a/src/test/resources/arquillian.xml	Tue Dec 13 16:42:41 2016 +0100
+++ b/src/test/resources/arquillian.xml	Tue Dec 13 17:24:06 2016 +0100
@@ -41,6 +41,7 @@
     </extension>
     <extension qualifier="persistence-dbunit">
       <property name="qualifiedTableNames">true</property>
+      <property name="datatypeFactory">org.dbunit.ext.postgresql.PostgresqlDataTypeFactory</property>
     </extension>
     <extension qualifier="persistence-script">
       <property name="showSql">true</property>
--- a/src/test/resources/datasets/dbUnit_ort.json	Tue Dec 13 16:42:41 2016 +0100
+++ b/src/test/resources/datasets/dbUnit_ort.json	Tue Dec 13 17:24:06 2016 +0100
@@ -12,8 +12,7 @@
         "koord_x_extern": "32487017",
         "koord_y_extern": "5519769",
         "letzte_aenderung": "2015-03-01 12:00:00",
-        "latitude": 49.83021,
-        "longitude": 8.81948,
+        "geom": "SRID=4326;POINT(49.83021 8.81948)",
         "ort_typ": 1,
         "kurztext": "kurz",
         "berichtstext": "bericht"
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)