From dc8cc2c0dc557f62e21607eda7835e658eca19fd Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 13 Nov 2016 15:30:23 +0100 Subject: [PATCH] Fixed example-code for hibernate-bug HHH-9615 --- src/it/hibernate-lob-converter-bug/pom.xml | 19 +++++++++++++++++-- .../src/test/java/io/blep/MyEntity.java | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/it/hibernate-lob-converter-bug/pom.xml b/src/it/hibernate-lob-converter-bug/pom.xml index b2a76e75..3d1eefd8 100644 --- a/src/it/hibernate-lob-converter-bug/pom.xml +++ b/src/it/hibernate-lob-converter-bug/pom.xml @@ -34,11 +34,26 @@ org.hibernate hibernate-entitymanager - 5.0.0-SNAPSHOT + 5.1.0.Final + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.7 + 1.7 + utf8 + true + + + + - \ No newline at end of file + diff --git a/src/it/hibernate-lob-converter-bug/src/test/java/io/blep/MyEntity.java b/src/it/hibernate-lob-converter-bug/src/test/java/io/blep/MyEntity.java index 0907809c..e8bbd36a 100644 --- a/src/it/hibernate-lob-converter-bug/src/test/java/io/blep/MyEntity.java +++ b/src/it/hibernate-lob-converter-bug/src/test/java/io/blep/MyEntity.java @@ -20,7 +20,7 @@ public class MyEntity { @Override public Integer convertToDatabaseColumn(String attribute) { - return attribute.length(); + return attribute == null ? 0 : attribute.length(); } @Override -- 2.20.1