Fixed bug in SQLElementList
This commit is contained in:
parent
304d957fa1
commit
dfa098a22d
@ -291,7 +291,7 @@ public abstract class SQLElement<E extends SQLElement<E>> {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
protected static <E extends SQLElement<E>> void addValueToSQLObjectList(List<Object> list, SQLField<E, ?> field, Object jValue) throws ORMException {
|
||||
if (jValue != null && field.type instanceof SQLCustomType) {
|
||||
try {
|
||||
|
@ -88,12 +88,6 @@ public class SQLElementList<E extends SQLElement<E>> extends ArrayList<E> {
|
||||
for (Map.Entry<SQLField<E, ?>, Object> entry : modifiedValues.entrySet()) {
|
||||
sqlSet += entry.getKey().getName() + " = ? ,";
|
||||
SQLElement.addValueToSQLObjectList(psValues, entry.getKey(), entry.getValue());
|
||||
if (entry.getKey().type.getJavaType().isEnum()) {
|
||||
// prise en charge enum (non prise en charge par JDBC)
|
||||
psValues.add(((Enum<?>) entry.getValue()).name());
|
||||
}
|
||||
else
|
||||
psValues.add(entry.getValue());
|
||||
}
|
||||
|
||||
if (sqlSet.length() > 0) sqlSet = sqlSet.substring(0, sqlSet.length() - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user