Fix StringListConverter to add empty string in database column if the array is empty.
This commit is contained in:
parent
263b368a4d
commit
f280e60562
|
@ -12,7 +12,7 @@ public class StringListConverter implements AttributeConverter<List<String>, Str
|
||||||
@Override
|
@Override
|
||||||
public String convertToDatabaseColumn(List<String> attribute) {
|
public String convertToDatabaseColumn(List<String> attribute) {
|
||||||
if (attribute == null || attribute.isEmpty()) {
|
if (attribute == null || attribute.isEmpty()) {
|
||||||
return null;
|
return "";
|
||||||
}
|
}
|
||||||
return String.join(ARRAY_DELIMITER, attribute);
|
return String.join(ARRAY_DELIMITER, attribute);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue