metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasper Sørensen (JIRA) <j...@apache.org>
Subject [jira] [Created] (METAMODEL-157) Jdbc delete uses Statement.setObject(...) which isn't always supported
Date Sat, 04 Jul 2015 09:14:04 GMT
Kasper Sørensen created METAMODEL-157:
-----------------------------------------

             Summary: Jdbc delete uses Statement.setObject(...) which isn't always supported
                 Key: METAMODEL-157
                 URL: https://issues.apache.org/jira/browse/METAMODEL-157
             Project: Apache MetaModel
          Issue Type: Bug
         Environment: PostgreSQL.
MetaModel-jdbc module.
            Reporter: Kasper Sørensen


I am trying to express a delete criteria using a date as the criteria for deleting. Like this
for example:
{code}
DELETE FROM table WHERE date_created = '2015-07-01'
{code}
The problem I run into is that my database driver (PostgreSQL) is complaining about the Statement.setObject(...)
call we are doing in JdbcDeleteBuilder line 73. I am passing in a java.util.Date and apparently
it's not able to properly handle it.

I notice that in e.g. JdbcUpdateBuilder (line 75) we use JdbcUtils.setStatementValue(...).
I imagine that doing this instead provides a better call into the JDBC API and thus will get
me out of my current JDBC driver exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message