You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andreas Hartmann (JIRA)" <ji...@apache.org> on 2010/01/21 15:26:54 UTC
[jira] Issue Comment Edited: (CAY-1371) EJBQL query doesn't
preserve grouping by brackets
[ https://issues.apache.org/jira/browse/CAY-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803299#action_12803299 ]
Andreas Hartmann edited comment on CAY-1371 at 1/21/10 2:25 PM:
----------------------------------------------------------------
The error seems to occur when the SQL string is built. The hierarchy of the EJBQL expression looks good:
Select
SelectClause
SelectExpressions
SelectExpression
Aggregate
Count
Identifier [t]
From
FromItem
AbstractSchemaName
IdentificationVariable [User]
Identifier [t]
Where
And
Equals
Path
Identifier [t]
IdentificationVariable [language]
IdentificationVariable [code]
StringLiteral ['fr']
Or
Like
Upper
Path
Identifier [t]
IdentificationVariable [email]
PatternValue
StringLiteral ['%ANDREAS.HARTMANN@GMAIL.COM%']
Like
Upper
Path
Identifier [t]
IdentificationVariable [email]
PatternValue
StringLiteral ['%NOBBY@MACBAY.DE%']
was (Author: andreas@apache.org):
The error seems to occur when the SQL string is built. The hierarchy of the EJBQL expression looks good:
<pre>
Select
SelectClause
SelectExpressions
SelectExpression
Aggregate
Count
Identifier [t]
From
FromItem
AbstractSchemaName
IdentificationVariable [User]
Identifier [t]
Where
And
Equals
Path
Identifier [t]
IdentificationVariable [language]
IdentificationVariable [code]
StringLiteral ['fr']
Or
Like
Upper
Path
Identifier [t]
IdentificationVariable [email]
PatternValue
StringLiteral ['%ANDREAS.HARTMANN@GMAIL.COM%']
Like
Upper
Path
Identifier [t]
IdentificationVariable [email]
PatternValue
StringLiteral ['%NOBBY@MACBAY.DE%']
</pre>
> EJBQL query doesn't preserve grouping by brackets
> -------------------------------------------------
>
> Key: CAY-1371
> URL: https://issues.apache.org/jira/browse/CAY-1371
> Project: Cayenne
> Issue Type: Bug
> Components: Core Library
> Affects Versions: 3.0RC2
> Reporter: Andreas Hartmann
>
> EJBQL statement:
> SELECT object(t) FROM User t WHERE (t.language.code = 'fr') AND ((upper(t.email) LIKE '%ANDREAS.HARTMANN@GMAIL.COM%') OR (upper(t.email) LIKE '%NOBBY@MACBAY.DE%'))
> Resulting query:
> SELECT COUNT(*) AS sc0 FROM public.user t0 INNER JOIN public.language t1 ON (t0.language = t1.code) WHERE t1.code = ? AND {fn UCASE( t0.email)} LIKE ? OR {fn UCASE( t0.email)} LIKE ?
> In the resulting query, the brackets surrounding the OR clause are lost.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.