The XML-configuration uses exact the same configuration as the annotated one
authorKai Moritz <kai@juplo.de>
Wed, 16 Aug 2017 08:45:46 +0000 (10:45 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 16 Aug 2017 11:36:33 +0000 (13:36 +0200)
src/test/resources/META-INF/mapping.xml

index 6b49b11..bb1231e 100644 (file)
@@ -5,14 +5,17 @@
     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_1.xsd"
     version="2.1">
 
-  <converter class="de.juplo.jpa.converters.ZonedDateTimeConverter" auto-apply="true"/>
-  <converter class="de.juplo.jpa.converters.OffsetDateTimeConverter" auto-apply="true"/>
-
   <entity class="de.juplo.jpa.converters.EierlegendeWollmilchSau" access="PROPERTY">
     <attributes>
       <id name="id">
         <generated-value/>
       </id>
+      <basic name="odt">
+        <convert converter="de.juplo.jpa.converters.OffsetDateTimeConverter"/>
+      </basic>
+      <basic name="zdt">
+        <convert converter="de.juplo.jpa.converters.ZonedDateTimeConverter"/>
+      </basic>
     </attributes>
   </entity>