From 182a7615b332c075a20c304678a46db068ef3bdc Mon Sep 17 00:00:00 2001 From: mrap1k Date: Tue, 26 Mar 2024 15:33:36 +0100 Subject: [PATCH] Improve insert/update script --- pom.xml | 2 +- .../java/cz/foresttech/database/DatabaseEntityConvertor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2f8397d..a9e0d1d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ cz.foresttech ForestDatabase - 1.0.3 + 1.0.4 17 diff --git a/src/main/java/cz/foresttech/database/DatabaseEntityConvertor.java b/src/main/java/cz/foresttech/database/DatabaseEntityConvertor.java index c9e7576..75e33e1 100644 --- a/src/main/java/cz/foresttech/database/DatabaseEntityConvertor.java +++ b/src/main/java/cz/foresttech/database/DatabaseEntityConvertor.java @@ -314,7 +314,7 @@ private String processFieldValue(Object value, DatabaseValueProcessor processor) value = processor.getValue(value); } - return (value instanceof String) ? "'" + escapeString((String) value) + "'" : value.toString(); + return "'" + ((value instanceof String) ? escapeString((String) value) : value.toString()) + "'"; } /**