correct comment
All checks were successful
WEB karideo and rabbit/archidata/pipeline/head This commit looks good
All checks were successful
WEB karideo and rabbit/archidata/pipeline/head This commit looks good
This commit is contained in:
parent
50cb92703b
commit
b85d5ec423
@ -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> T insertWithJson(Class<T> 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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user