Re: EJBQL and parameters

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Apr 09 2009 - 09:58:55 EDT

  • Next message: Andrey Razumovsky: "Re: JPA crossroads"

    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



    This archive was generated by hypermail 2.0.0 : Thu Apr 09 2009 - 09:59:32 EDT