You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Hugi Thordarson <hu...@karlmenn.is> on 2015/08/27 22:46:34 UTC

Error when executing EJBQL generated from an expression containing outer joins

Boy… I’m really drowning you folks with mail today. Sorry about that.

The gist below shows code where I’m attempting to perform an EJBQL query using a where clause generated from an Expression containing an outer join.
If I don’t do an outer join (i.e. just drop the outer() call when generating the expression) everything works fine.
Is this a bug in EJBQL generation or am I doing something wrong? The EJBQL “where”-clause generated from the expression (using “a” as rootId) is:

a.user+.name = 'Hugi Þórðarson'

https://gist.github.com/hugith/c2ee883970b856543bff

Cheers,
- hugi

Re: Error when executing EJBQL generated from an expression containing outer joins

Posted by Hugi Thordarson <hu...@karlmenn.is>.
Thanks Andrus, I suspected as much. Guess it’s time to brush up on my javacc knowledge :)

Cheers,
- hugi



> On 7. sep. 2015, at 06:19, Andrus Adamchik <an...@objectstyle.org> wrote:
> 
> Likely a limitation in EJBQL. Originally we tried to stick with JPA spec for EJBQL syntax, and that does not support + notation for outer joins. Instead it has a separate join clause. Now we are no longer bound with JPA compatibility and can actually accept paths with outer joins. But I guess it has never been implemented in EJBQL parser.
> 
> Andrus
> 
> 
>> On Aug 27, 2015, at 11:46 PM, Hugi Thordarson <hu...@karlmenn.is> wrote:
>> 
>> Boy… I’m really drowning you folks with mail today. Sorry about that.
>> 
>> The gist below shows code where I’m attempting to perform an EJBQL query using a where clause generated from an Expression containing an outer join.
>> If I don’t do an outer join (i.e. just drop the outer() call when generating the expression) everything works fine.
>> Is this a bug in EJBQL generation or am I doing something wrong? The EJBQL “where”-clause generated from the expression (using “a” as rootId) is:
>> 
>> a.user+.name = 'Hugi Þórðarson'
>> 
>> https://gist.github.com/hugith/c2ee883970b856543bff
>> 
>> Cheers,
>> - hugi
>> 
> 


Re: Error when executing EJBQL generated from an expression containing outer joins

Posted by Andrus Adamchik <an...@objectstyle.org>.
Likely a limitation in EJBQL. Originally we tried to stick with JPA spec for EJBQL syntax, and that does not support + notation for outer joins. Instead it has a separate join clause. Now we are no longer bound with JPA compatibility and can actually accept paths with outer joins. But I guess it has never been implemented in EJBQL parser.

Andrus


> On Aug 27, 2015, at 11:46 PM, Hugi Thordarson <hu...@karlmenn.is> wrote:
> 
> Boy… I’m really drowning you folks with mail today. Sorry about that.
> 
> The gist below shows code where I’m attempting to perform an EJBQL query using a where clause generated from an Expression containing an outer join.
> If I don’t do an outer join (i.e. just drop the outer() call when generating the expression) everything works fine.
> Is this a bug in EJBQL generation or am I doing something wrong? The EJBQL “where”-clause generated from the expression (using “a” as rootId) is:
> 
> a.user+.name = 'Hugi Þórðarson'
> 
> https://gist.github.com/hugith/c2ee883970b856543bff
> 
> Cheers,
> - hugi
>