cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CAY-2137) When generating SQL from EJBQL, use "AND" to separate multiple join conditions rather than a comma
Date Mon, 23 Jan 2017 12:17:26 GMT

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

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

> 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)

Mime
View raw message