Fix StringListConverter to add empty string in database column if the array is empty.

This commit is contained in:
Konstantinos Triantafyllou 2023-08-04 15:57:40 +03:00
parent 263b368a4d
commit f280e60562
1 changed files with 1 additions and 1 deletions

View File

@ -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);
} }