cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Fetching Specified "Raw Rows" with SelectQuery
Date Sun, 25 Apr 2010 09:33:20 GMT

On Apr 25, 2010, at 5:17 PM, Andrew Lindesay wrote:
> Hi Andrus;
>>> I would rather not have free-form query strings in my code; I  
>>> prefer compiling against the Cayenne query-assembly objects.
>> Yeah, that's a somewhat unfortunate situation, as there are plans  
>> for SelectQuery-like API for EJBQL in 3.1, but the old API for  
>> specifying columns is gone already.
> Is it easy/hard/impossible to plumb back in again? :)

Not impossible, but is indeed rather involved and I don't see much  
point doing it. Encapsulating the String parts of the EJBQL-based  
select in some helper class is probably easier. After all this is not  
SQL and the path parts are based on the object properties whose names  
are auto-generated for the entity classes, and the rest can be  
parameterized and encapsulated. Expression.toEJBQL(..) method should  
help too (although it probably has a few remaining holes when used  
with non-"primitive" parameters).

>>> Do you think this would be a tricky thing for me to safely  
>>> implement in the 3.0-TRUNK?
>> What do you mean by 3.0-TRUNK?
> I mean for use with 3.0.1 where you applied my other two patches  
> earlier this month.

I see. Here is this branch location:


View raw message