From 602e3521b45e808638640f69cce3e412ba447a5d Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Wed, 16 Aug 2017 13:43:46 -0400 Subject: [PATCH] Values return to the client in a proxy object should be converted to the proper type. --- pom.xml | 2 +- .../net/helenus/core/operation/InsertOperation.java | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7be0cc1..90b9ef9 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 net.helenus helenus-core - 2.0.19-SNAPSHOT + 2.0.20-SNAPSHOT jar helenus diff --git a/src/main/java/net/helenus/core/operation/InsertOperation.java b/src/main/java/net/helenus/core/operation/InsertOperation.java index e6220ad..602696c 100644 --- a/src/main/java/net/helenus/core/operation/InsertOperation.java +++ b/src/main/java/net/helenus/core/operation/InsertOperation.java @@ -34,6 +34,7 @@ import net.helenus.support.HelenusException; import net.helenus.support.HelenusMappingException; import java.util.*; +import java.util.function.Function; public final class InsertOperation extends AbstractOperation> { @@ -153,7 +154,14 @@ public final class InsertOperation extends AbstractOperation> converter = prop.getReadConverter(sessionOps.getSessionRepository()); + if (converter.isPresent()) { + backingMap.put(key, converter.get().apply(backingMap.get(key))); + } + } else { // If we started this operation with an instance of this type, use values from that. if (pojo != null) { backingMap.put(key, BeanColumnValueProvider.INSTANCE.getColumnValue(pojo, -1, prop));