You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Graham Collinson (JIRA)" <ji...@apache.org> on 2014/09/30 14:09:34 UTC
[jira] [Comment Edited] (CAY-1957) Multiple inExp are grouped into
one in()
[ https://issues.apache.org/jira/browse/CAY-1957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14153058#comment-14153058 ]
Graham Collinson edited comment on CAY-1957 at 9/30/14 12:09 PM:
-----------------------------------------------------------------
Sorry. older version - v3.0.2. Simple answer to me then - upgrade!
Thanks for testing.
was (Author: colling2):
Sorry. older version - v3.0.2.1. Simple answer to me then - upgrade!
Thanks for testing.
> Multiple inExp are grouped into one in()
> ----------------------------------------
>
> Key: CAY-1957
> URL: https://issues.apache.org/jira/browse/CAY-1957
> Project: Cayenne
> Issue Type: Bug
> Reporter: Graham Collinson
> Priority: Minor
>
> If I were to write in sql
> Select * from test where a in (1,2,3) and a in (1,2)
>
> I’d only get rows where a is 1 or 2.
>
> If you do similar with cayenne expressions
>
> Expression exp = ExpressionFactory.inExp(COLUMN_A, {set with 1,2,3})
> .andExp(ExpressionFactory.inExp(COLUMN_A, {set with 1,2});
>
> Then cayenne will turn that into a sql statement like
> Select * from test where a in (1,2,3);
> Is this expected behaviour?
> To work more like SQL it would be better if there were 2 in statements or if it could be optimised to be in (1,2)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)