You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "B.J. Reed (JIRA)" <ji...@apache.org> on 2009/02/16 19:56:02 UTC
[jira] Updated: (OPENJPA-918) Stored procedures not handling
returns properly
[ https://issues.apache.org/jira/browse/OPENJPA-918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-918:
------------------------------
Attachment: OPENJPA-918-test.patch
After futher testing...
It appears that procedures that return no data work properly when called by:
Query query = em.createNativeQuery(sql);
query.executeUpdate();
Procedures that return one ResultSet of data also seem to work properly when the kind of object is defined when creating the Query.
Query query = em.createNativeQuery(sql, Applicant.class);
List<Applicant> appList = query.getResultList();
(query.getSingleResult() works similar to getResultList())
However, stored procedures also have the ability to return multiple types of objects in separate ResultSet of data. When trying to get a ResultList(), I use
Query query = em.createNativeQuery(sql);
List<Applicant> appList = query.getResultList();
and get:
Statement.executeQuery() cannot be called with a statement that returns a row count. Odd message since a row count is not being returned, but multiple ResultSets
> Stored procedures not handling returns properly
> -----------------------------------------------
>
> Key: OPENJPA-918
> URL: https://issues.apache.org/jira/browse/OPENJPA-918
> Project: OpenJPA
> Issue Type: New Feature
> Components: query
> Affects Versions: 2.0.0
> Reporter: B.J. Reed
> Assignee: B.J. Reed
> Fix For: 2.0.0
>
> Attachments: OPENJPA-918-test.patch
>
>
> Stored procedures with output parameters are not being handled properly. Patch will be attached shortly with test cases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.