[ 
https://issues.apache.org/jira/browse/CAY-2871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev closed CAY-2871.
--------------------------------
    Resolution: Fixed

*5.0*: 
[https://github.com/apache/cayenne/commit/a036d3fcba885c31ab3a9fbf0244fe778075a00e]

*4.2*: 
[https://github.com/apache/cayenne/commit/079fbe7ba239166af8cab02ac34c3a5feb42124b]

 

> QualifierTranslator breaks on a relationship with a compound FK
> ---------------------------------------------------------------
>
>                 Key: CAY-2871
>                 URL: https://issues.apache.org/jira/browse/CAY-2871
>             Project: Cayenne
>          Issue Type: Bug
>    Affects Versions: 4.2, 4.2.1
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>            Priority: Critical
>             Fix For: 4.2.2, 5.0-M2
>
>
> Expression like this:
> {code:java}
> Expression exp = CompoundFkTestEntity.TO_COMPOUND_PK.eq(objectId1)
>                 .or(CompoundFkTestEntity.TO_COMPOUND_PK.eq(objectId2)
> {code}
> Completely breaks {{QualifierTranslator}} and produces incorrect SQL like 
> this:
> {{( ( t0.F_KEY1 = 'PK1' ) AND ( t0.F_KEY2 = 'PK2' ) ) OR ( 'PK4' 'PK3' )}}
> Note that the first equality translates completely fine, it's the second (and 
> further) that breaks everything.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to