Skip to content
Snippets Groups Projects
Commit 61f7b7c5 authored by Juan Fuentes's avatar Juan Fuentes
Browse files

SSDM-8226 : Providing explicit castings + tests

parent 067c2159
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ public class CollectionFieldSearchConditionTranslator implements IConditionTrans
private static final Map<Class, Object[]> arrayCasting = new HashMap<>();
static {
arrayCasting.put(CodesSearchCriteria.class, new String[0]);
arrayCasting.put(IdsSearchCriteria.class, new Long[0]);
arrayCasting.put(IdsSearchCriteria.class, new String[0]); // Only Tech Ids are longs and there is no way to know
arrayCasting.put(UserIdsSearchCriteria.class, new String[0]);
}
......@@ -53,7 +53,7 @@ public class CollectionFieldSearchConditionTranslator implements IConditionTrans
final StringBuilder sqlBuilder, final Map<String, JoinInformation> aliases, final Map<String, String> dataTypeByPropertyName)
{
if (!arrayCasting.containsKey(criterion.getClass())) {
throw new RuntimeException("Unsupported CollectionFieldSearchCriteria, this is a core error, contact the development team.");
throw new RuntimeException("Unsupported " + CollectionFieldSearchCriteria.class.getSimpleName() + ", this is a core error, contact the development team.");
}
switch (criterion.getFieldType()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment