You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Fernando (JIRA)" <ji...@apache.org> on 2008/11/26 04:16:44 UTC
[jira] Created: (OPENJPA-787) slices query.getSingleResult is
broken
slices query.getSingleResult is broken
--------------------------------------
Key: OPENJPA-787
URL: https://issues.apache.org/jira/browse/OPENJPA-787
Project: OpenJPA
Issue Type: Bug
Components: query
Affects Versions: 2.0.0
Reporter: Fernando
Priority: Critical
Pinaki Poddar wrote:
> Query.getSingleResult() is badly broken (or, more precisely non-existent).
> Currently, use the workaround for Query.getSingleResult() i.e.
> Query.getResultList().get(0)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-787) slices query.getSingleResult is
broken
Posted by "Fernando (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651167#action_12651167 ]
Fernando commented on OPENJPA-787:
----------------------------------
very simple patch. should fix this issue.
--- openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedStoreQuery.java (revision 721000)
+++ openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedStoreQuery.java (working copy)
@@ -147,10 +147,10 @@
}
boolean[] ascending = getAscending(q);
boolean isAscending = ascending.length > 0;
- boolean isUnique = q.getContext().isUnique();
+ boolean isAggregate = q.getContext().isAggregate();
boolean hasRange = q.getContext().getEndRange() != Long.MAX_VALUE;
ResultObjectProvider result = null;
- if (isUnique) {
+ if (isAggregate) {
result = new UniqueResultObjectProvider(tmp, q,
getQueryExpressions());
} else if (isAscending) {
But though it looks like it's working better. Now I'm hitting another bug, that it looks like somehow the old EnityManager/Broker is being reused across requests. I know this because it works fine for first request, but second request complains that the Broker is already closed. So I might be opening up a new bug for that.
> slices query.getSingleResult is broken
> --------------------------------------
>
> Key: OPENJPA-787
> URL: https://issues.apache.org/jira/browse/OPENJPA-787
> Project: OpenJPA
> Issue Type: Bug
> Components: query
> Affects Versions: 2.0.0
> Reporter: Fernando
> Priority: Critical
>
> Pinaki Poddar wrote:
> > Query.getSingleResult() is badly broken (or, more precisely non-existent).
> > Currently, use the workaround for Query.getSingleResult() i.e.
> > Query.getResultList().get(0)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-787) slices query.getSingleResult is
broken
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick reassigned OPENJPA-787:
------------------------------------
Assignee: Pinaki Poddar
> slices query.getSingleResult is broken
> --------------------------------------
>
> Key: OPENJPA-787
> URL: https://issues.apache.org/jira/browse/OPENJPA-787
> Project: OpenJPA
> Issue Type: Bug
> Components: query
> Affects Versions: 2.0.0
> Reporter: Fernando
> Assignee: Pinaki Poddar
> Priority: Critical
>
> Pinaki Poddar wrote:
> > Query.getSingleResult() is badly broken (or, more precisely non-existent).
> > Currently, use the workaround for Query.getSingleResult() i.e.
> > Query.getResultList().get(0)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-787) slices query.getSingleResult is
broken
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar updated OPENJPA-787:
----------------------------------
Component/s: (was: query)
slice
> slices query.getSingleResult is broken
> --------------------------------------
>
> Key: OPENJPA-787
> URL: https://issues.apache.org/jira/browse/OPENJPA-787
> Project: OpenJPA
> Issue Type: Bug
> Components: slice
> Affects Versions: 2.0.0
> Reporter: Fernando
> Assignee: Pinaki Poddar
> Priority: Critical
>
> Pinaki Poddar wrote:
> > Query.getSingleResult() is badly broken (or, more precisely non-existent).
> > Currently, use the workaround for Query.getSingleResult() i.e.
> > Query.getResultList().get(0)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-787) slices query.getSingleResult is
broken
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar resolved OPENJPA-787.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
> slices query.getSingleResult is broken
> --------------------------------------
>
> Key: OPENJPA-787
> URL: https://issues.apache.org/jira/browse/OPENJPA-787
> Project: OpenJPA
> Issue Type: Bug
> Components: slice
> Affects Versions: 2.0.0
> Reporter: Fernando
> Assignee: Pinaki Poddar
> Priority: Critical
> Fix For: 2.0.0
>
>
> Pinaki Poddar wrote:
> > Query.getSingleResult() is badly broken (or, more precisely non-existent).
> > Currently, use the workaround for Query.getSingleResult() i.e.
> > Query.getResultList().get(0)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.