From b85d5ec4230b889825fdcdc020e710292a8e4862 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sun, 29 Jan 2023 23:13:07 +0100 Subject: [PATCH] correct comment --- src/org/kar/archidata/SqlWrapper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/kar/archidata/SqlWrapper.java b/src/org/kar/archidata/SqlWrapper.java index eec4080..89a440b 100644 --- a/src/org/kar/archidata/SqlWrapper.java +++ b/src/org/kar/archidata/SqlWrapper.java @@ -387,11 +387,12 @@ public class SqlWrapper { } return data; } - + // seems a good idea, but very dangerous if we not filter input data... if set an id it can be complicated... public static T insertWithJson(Class clazz, String jsonData) throws Exception { ObjectMapper mapper = new ObjectMapper(); // parse the object to be sure the data are valid: T data = mapper.readValue(jsonData, clazz); + return insert(data); }