周雁鸣 (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMjcxYjdiM2Nm...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16420?atlOrigin=eyJpIjoiMjcxYj...
) HHH-16420 (
https://hibernate.atlassian.net/browse/HHH-16420?atlOrigin=eyJpIjoiMjcxYj...
) CriteriaBuilder.function() doesn't support array result type (
https://hibernate.atlassian.net/browse/HHH-16420?atlOrigin=eyJpIjoiMjcxYj...
)
Issue Type: Bug Affects Versions: 6.1.7, 6.2.0 Assignee: 周雁鸣 (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) Components: hibernate-core, regression Created: 02/Apr/2023 23:42 PM Priority: Major
Reporter: 周雁鸣 (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
cb.function("string_to_array", String[].class, ... ) will throw
java.lang.IllegalArgumentException: Passed `invariantType` for function return cannot be
null , because SqmCriteriaNodeBuilder::function doesn’t recognize array type
String[].class , It may resolved by
final BasicType<T> resultType;
if (type.isArray()) {
BasicType<?> componentType =
getTypeConfiguration().getBasicTypeForJavaType(type.getComponentType());
resultType = new BasicArrayType(componentType, new
ArrayJdbcType(componentType.getJdbcType()),
new ArrayJavaType<>(componentType.getJdbcJavaType()));
}
else {
resultType = getTypeConfiguration().getBasicTypeForJavaType(type);
}
(
https://hibernate.atlassian.net/browse/HHH-16420#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16420#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100221- sha1:d541bce )