You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Andrus Adamchik <an...@objectstyle.org> on 2009/04/09 15:58:55 UTC

Re: EJBQL and parameters

On Apr 9, 2009, at 3:58 PM, Andrus Adamchik wrote:

>>
>> Still, I'm intrigued by the idea of being able to directly script  
>> EJBQLQuery.  Anybody else think that's interesting? If there's a  
>> favorable consensus, I'll add an issue and assign it to myself.
>
> I am not necessarily against it, but my own priority would be to  
> make SelectQuery-like type-safe object API for EJBQL as an  
> alternative to String concatenation.

[taking to dev]

A few more thoughts. The difference between EJBQL and SQL as far as  
Cayenne is concerned is that the former is "structured" while the  
later is not. Never mind that "S" in SQL stands for "structured",  
Cayenne does not attempt to parse it. Scripting was added as a  
mechanism to work around that. Even #(..) directives is mostly to tie  
the String back to JDBC, rather then adding structure...

I think we can do better with EJBQL, adding API to build and customize  
it. As for scripting my vote would be to start with the  
EJBQLTemplateQuery idea, to avoid changing EJBQLQuery until we figure  
the type-safe API.

Andrus