The code is generating a query:
{noformat}select datasourceView.id, max(datasourceView.datasourceStatus) as DATASOURCE_STATUS_helper_column, datasourceView.id as ID_helper_column{noformat}
datasourceStatus is an enum mapped to a text column.
{noformat}@Column(name = "status") @Enumerated(EnumType.STRING) private DatasourceStatus datasourceStatus;{noformat}
As a result I get.
{{org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.QueryException: Parameter 1 of function max() has type COMPARABLE, but argument is of type com.xxx.datasource.domain.DatasourceStatus}}
This query was working in Hibernate 6.1.7 (and 5+ versions). It seems it was introduced in 6.2.0 and it is also present it the latest available version.
Chainging the enum definitaion to expliclty implement comparable doesn’t help. |
|