[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-4916) Literal with JDBC escape syntax for date doesn't work
Steve Ebersole (JIRA)
noreply at atlassian.com
Sun Feb 14 09:45:29 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-4916.
-------------------------------
Resolution: Rejected
> 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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list