[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2772) with-clause stopped working

Rafal Figas (JIRA) noreply at atlassian.com
Tue Feb 21 15:19:12 EST 2012


    [ https://hibernate.onjira.com/browse/HHH-2772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45574#comment-45574 ] 

Rafal Figas commented on HHH-2772:
----------------------------------

Hereby I confirm this bug exists in 3.6.7.

> with-clause stopped working
> ---------------------------
>
>                 Key: HHH-2772
>                 URL: https://hibernate.onjira.com/browse/HHH-2772
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: query-hql
>    Affects Versions: 3.2.2, 3.2.3, 3.2.4, 3.2.4.sp1, 3.2.5
>            Reporter: Ivo Danihelka
>
> The with-clause stopped working in all hibernate versions above 3.2.1 (i.e. 3.2.2+).
> Before that, it was possible to write HQL:
> SELECT cat FROM Cat cat LEFT JOIN cat.kittens as kitten WITH kitten.owner=:owner
> Now the HQL is raising an exception:
> org.hibernate.hql.ast.InvalidWithClauseException: with clause can only reference columns in the driving table
> Workaround is to explicitly use primary key (ownerId):
> SELECT cat FROM Cat cat LEFT JOIN cat.kittens as kitten WITH kitten.owner.ownerId=:ownerId

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list