A misleading `CastClassException` is thrown if a `SimpleExpression` was retrieved via `SimpleExpression.ignoreCase()` but the targeted type is not of type String.
I observed this in my generic Criteria builder method where I filtered on an property of type `Long` and it always said: "Could not cast Long to String" and the provided value was definetly a Long.
Idea: Ignore "ignoreCase" property in case targeted type is not of String.
|