You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrey Razumovsky (JIRA)" <ji...@apache.org> on 2009/12/17 16:29:20 UTC

[jira] Created: (CAY-1341) EJBQL: joins on joined table not added to generated SQL

EJBQL: joins on joined table not added to generated SQL
-------------------------------------------------------

                 Key: CAY-1341
                 URL: https://issues.apache.org/jira/browse/CAY-1341
             Project: Cayenne
          Issue Type: Bug
          Components: Cayenne Core Library
    Affects Versions: 3.0 beta 1
            Reporter: Andrey Razumovsky


Here's the query:
select g from Gallery g inner join g.paintingArray p where p.toArtist.artistName like '%a%'

It generates 
SELECT t0.GALLERY_ID AS ec0_1, t0.GALLERY_NAME AS ec0_0 FROM GALLERY t0 INNER JOIN PAINTING t1 ON (t0.GALLERY_ID = t1.GALLERY_ID) WHERE t2.ARTIST_NAME LIKE ?

Join for artist is not added, so query fails with error: Column not found: T2.ARTIST_NAME

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (CAY-1341) EJBQL: joins on joined table not added to generated SQL

Posted by "Andrey Razumovsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Razumovsky closed CAY-1341.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0 beta 2
         Assignee: Andrey Razumovsky

> EJBQL: joins on joined table not added to generated SQL
> -------------------------------------------------------
>
>                 Key: CAY-1341
>                 URL: https://issues.apache.org/jira/browse/CAY-1341
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0 beta 1
>            Reporter: Andrey Razumovsky
>            Assignee: Andrey Razumovsky
>             Fix For: 3.0 beta 2
>
>
> Here's the query:
> select g from Gallery g inner join g.paintingArray p where p.toArtist.artistName like '%a%'
> It generates 
> SELECT t0.GALLERY_ID AS ec0_1, t0.GALLERY_NAME AS ec0_0 FROM GALLERY t0 INNER JOIN PAINTING t1 ON (t0.GALLERY_ID = t1.GALLERY_ID) WHERE t2.ARTIST_NAME LIKE ?
> Join for artist is not added, so query fails with error: Column not found: T2.ARTIST_NAME

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.