|
When using the isMember operator on a collection of enums the enum parameter is not converted correct. In my attached test case I use hsql, which is throwing an exception: Caused by: java.sql.SQLSyntaxErrorException: incompatible data type in conversion
Using an oracle-db I just get an empty result, because of the mismatch of the types of the parameter and the field.
Expression<Set<SimpleEnum>> simpleEnums = root.get( Person_.enumCollection);
cq.where(cb.isMember(SimpleEnum.A, simpleEnums));
Expression<Set<SimpleEnum>> simpleEnums = root.get( Person_.enumCollection);
cq.where(cb.isMember(SimpleEnum.A, simpleEnums));
Expression<Collection<String>> simpleEnums = root.get("enumCollection");
cq.where(cb.isMember("A", simpleEnums));
|