You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (JIRA)" <ji...@apache.org> on 2017/01/20 10:10:26 UTC

[jira] [Assigned] (CAY-2137) When generating SQL from EJBQL, use "AND" to separate multiple join conditions rather than a comma

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

Nikita Timofeev reassigned CAY-2137:
------------------------------------

    Assignee: Nikita Timofeev

> When generating SQL from EJBQL, use "AND" to separate multiple join conditions rather than a comma
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAY-2137
>                 URL: https://issues.apache.org/jira/browse/CAY-2137
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>    Affects Versions: 4.0.M4
>            Reporter: Hugi Thordarson
>            Assignee: Nikita Timofeev
>            Priority: Minor
>
> When Cayenne generates SQL for EJBQLQueries that use relationships with multiple joins, it puts commas between the join conditions in the resulting SQL-statement. This does not work with some databases (at least Informix) which wants “AND” between joins.
> For example, this doesn’t work: 
> …FROM bok_invoice_line t0 INNER JOIN bok_invoice t1 ON (t0.company = t1.company, t0.year = t1.year)
> While this works:
> …FROM bok_invoice_line t0 INNER JOIN bok_invoice t1 ON (t0.company = t1.company AND t0.year = t1.year)
> If the same expression is used in a regular SelectQuery, Cayenne puts “AND” between the joins rather than commas and everything will work fine. This issue is for aligning the behaviour of these two to make it more compatible (use AND when generating SQL from EJBQL).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)