[ 
https://issues.apache.org/jira/browse/OPENJPA-1907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla resolved OPENJPA-1907.
--------------------------------------
    Resolution: Fixed

Already fixed on master: aedc8d9dd (OPENJPA-1907, on master): 
DB2Dictionary.setDate (DB2Dictionary.java:1111-1117) binds java.util.Date as 
java.sql.Date when column info is missing; this applies only on DB2 z/OS, which 
is where the issue authors applied it. Closing; please reopen if this still 
happens with OpenJPA 4.x.

> Exact type of date-valued parameter not preserved during prepared query 
> reparameterization
> ------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1907
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1907
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Pinaki Poddar
>            Assignee: Jeremy Bauer
>            Priority: Major
>
> Date valued query parameter such as java.util.Date gets bound as timestamp 
> during prepared query reparametrization. Though the parameter value carries 
> the exact type, the prepared query executor when binds the value via 
> DBDictionary setDate(...) -- the logic defaults the value to be bound to the 
> JDBC statement as Timestamp. DB2 database does not like the type change and 
> returns wrong result --   MySQL/Derby etc tolarates the type change and gets 
> correct result.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to