You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2015/07/04 11:14:04 UTC

[jira] [Created] (METAMODEL-157) Jdbc delete uses Statement.setObject(...) which isn't always supported

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)