Fixed example-code for hibernate-bug HHH-9615
authorKai Moritz <kai@juplo.de>
Sun, 13 Nov 2016 14:30:23 +0000 (15:30 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 13 Nov 2016 16:37:15 +0000 (17:37 +0100)
src/it/hibernate-lob-converter-bug/pom.xml
src/it/hibernate-lob-converter-bug/src/test/java/io/blep/MyEntity.java

index b2a76e7..3d1eefd 100644 (file)
         <dependency>
             <groupId>org.hibernate</groupId>
             <artifactId>hibernate-entitymanager</artifactId>
-            <version>5.0.0-SNAPSHOT</version>
+            <version>5.1.0.Final</version>
         </dependency>
 
     </dependencies>
 
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+        <configuration>
+          <source>1.7</source>
+          <target>1.7</target>
+          <encoding>utf8</encoding>
+          <showWarnings>true</showWarnings>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 
-</project>
\ No newline at end of file
+</project>
index 0907809..e8bbd36 100644 (file)
@@ -20,7 +20,7 @@ public class MyEntity {
 
         @Override
         public Integer convertToDatabaseColumn(String attribute) {
-            return attribute.length();
+            return attribute == null ? 0 : attribute.length();
         }
 
         @Override