Setting query parameters of type Date or Calendar fails
[cmd.parameters.add] [JPA] [parameters] [parameters.add] [wrong parameters]
Symptom
You use a setParameter method call of the javax.persistence.Query API
to bind a parameter of type java.util.Date or java.util.Calendar.
Although you specify the TemporalType correctly, you get an IllegalArgumentException stating that the types of the parameter value to set and the type of the parameter in the query don’t match.
Other terms
JPA
Reason and Prerequisites
TemporalTypes are handled [...]