When creating a query with an enum as a parameter hibernate fails with the following exception
This is a sample code to reproduce the bug:
Also I created two repositories for Hibernate 5 and Hibernate 6 which show that this worked in Hibernate 5 but is failing in Hibernate 6: https://github.com/TheChronicler/hibernate5_enum_test_case/tree/master https://github.com/TheChronicler/hibernate6_enum_test_case Note that the exception is only thrown when the parameter is set to a value other than null |