You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Thomas Hug (JIRA)" <ji...@apache.org> on 2014/04/30 11:20:17 UTC
[jira] [Resolved] (DELTASPIKE-581) CountQueryPostProcessor assumes
a where clause
[ https://issues.apache.org/jira/browse/DELTASPIKE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Hug resolved DELTASPIKE-581.
-----------------------------------
Resolution: Fixed
Fix Version/s: 0.7
The assumption was to use findAll and count on EntityRepository for empty where clauses ;-) but gets now properly appended with empty string.
> CountQueryPostProcessor assumes a where clause
> ----------------------------------------------
>
> Key: DELTASPIKE-581
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-581
> Project: DeltaSpike
> Issue Type: Bug
> Components: Data-Module
> Affects Versions: 0.7
> Environment: openejb-core 4.6.1-SNAPSHOT
> Deltaspike 0.7-SNAPSHOT
> Reporter: Karl Kildén
> Assignee: Thomas Hug
> Fix For: 0.7
>
>
> CountQueryPostProcessor assumes there's a where clause when it rewrites to count query.
> private String rewrite()
> {
> return "select count(" + (select != null ? select : entityName) + ") " + from + where;
> }
> here where can easily be null causing a query like this:
> select count( fact ) from Fact factnull
--
This message was sent by Atlassian JIRA
(v6.2#6252)