Consider an entity with an ID of type Long. An entity can be found based on it's ID in a criteria query using a construct such as this
However, when setting hibernate.criteria.literal_handling_mode to BIND, this no longer works, but results in the error:
java.lang.IllegalArgumentException: Parameter value  did not match expected type [org.hibernate.bugs.TestEntity (n/a)]
Test case can be found on GitHub. The test case hhh14130_test_works passes, and hhh14130_test_fails fails.