]
Steve Ebersole reassigned HHH-4916:
-----------------------------------
Assignee: Steve Ebersole
Literal with JDBC escape syntax for date doesn't work
-----------------------------------------------------
Key: HHH-4916
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4916
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.5.0-CR-1
Reporter: Juergen Zimmermann
Assignee: Steve Ebersole
I'm having an entity with a java.util.Date attribute:
@Entity
public class Kunde implements Serializable {
@Temporal(DATE)
private Date seit;
...
}
The following named query crashes, when a Date literal is used for parameter
instantiation:
SELECT k
FROM Kunde k
WHERE k.seit = :seit
Here is the stacktrace:
java.lang.IllegalArgumentException: Parameter value [{d '2001-01-31'}] was not
matching type [java.util.Date]
at
org.hibernate.ejb.AbstractQueryImpl.registerParameterBinding(AbstractQueryImpl.java:354)
at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:354)
at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:71)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: