cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugi Thordarson <>
Subject Re: EJBQL: Arithmetic operations
Date Mon, 15 Aug 2016 16:02:38 GMT
Thanks for this Andrus. One last question: Can I use db:-paths in EJBQL queries? Particularly,
I’m attempting to use FK-columns (that aren’t exposed in the ObjEntity) in my queries,
perhaps there’s another way?

- hugi

> On 15. ágú. 2016, at 15:31, Andrus Adamchik <> wrote:
> Ah yeah, now checking the code I am starting to remember. Arithmetic expressions are
not allowed in SELECT clause, only in WHERE. There's no real reason for it other then us initially
basing EJBQL parser on some early JPA spec that probably didn't support it. We need to add
it to the parser. For now it won't work.
> Andrus
>> On Aug 15, 2016, at 5:49 PM, Hugi Thordarson <> wrote:
>> Hi Andrus,
>>> On 15. ágú. 2016, at 06:30, Andrus Adamchik <>
>>> Hi Hugi,
>>> Sorry for delayed reply. I swear we had the BNF for EJBQL in the docs, but apparently
we don't. Here is the closest thing to it - a JavaCC grammar:
>>> We do support simple arithmetic operations. Search for 'arithmetic_' clauses
in the .jjt.
>> I’m not as smart as you think—I haven’t touched JavaCC grammar before, though
I could figure it out but I don’t see how to do this :). Can you tell me how I can do something
equivalent to “select e.price*e.quantity from Entry e”?
>> Cheers,
>> - hugi

View raw message