You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/12/01 17:50:12 UTC
[jira] [Commented] (OPENJPA-2131) Missing IN or OUT parameter
exception with OracleDictionary
[ https://issues.apache.org/jira/browse/OPENJPA-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14230026#comment-14230026 ]
ASF subversion and git services commented on OPENJPA-2131:
----------------------------------------------------------
Commit 1642710 from [~fyrewyld] in branch 'openjpa/branches/2.2.x'
[ https://svn.apache.org/r1642710 ]
OPENJPA-2131: Missing IN or OUT parameter exception with OracleDictionary - added generated serialversionid
> Missing IN or OUT parameter exception with OracleDictionary
> -----------------------------------------------------------
>
> Key: OPENJPA-2131
> URL: https://issues.apache.org/jira/browse/OPENJPA-2131
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.1.1
> Environment: Windows with Oracle 11g
> Reporter: Zilin Chen
> Assignee: Albert Lee
> Fix For: 2.0.3, 2.1.2, 2.2.1.1, 2.2.3, 2.3.0
>
> Attachments: OPENJPA-2131.22x.patch, OracleInOutParameterIssue.patch
>
>
> We have generate query with
> Query q = em.createQuery("select e._name, e._id, sum(case when e._status=:pending then e._count else 0 end) from Exceptions e, Historty h where e._guid = :guid and .....
> then set paramenters for both :pending (in select) and :guid (in where), and call q.setMaxResults(100);
> with DB2, everything works fine, and DBDictionary.getSelects() and SQLBuffer.append() will invoke correctly and set parameter of :pending
> with Oracle implementation, OracleDictionary.getSelects(Select sel, boolean distinctIdentifiers, boolean forUpdate) will invoke and SQLBuffer.getSQL() get to call (as two if checks are not satisfied and gos to create a new SQLBuffer instance), but this time :pending parameter will missing to add to _param List,
> Eventually, we'll get Missing IN or OUT parameter exception from to execute query by preparedStatement
> This bug exist in both this branch and trunk.
> We have a work around, after SQLBuffer.getSQL() call, add some code to reset _param list.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)