Re: NamedQuery / SQLTemplate keyPath validation

From: Marcin Skladaniec (marci..sh.com.au)
Date: Tue Jun 10 2008 - 19:54:25 EDT

  • Next message: Scott Anderson: "Expression question"

    Sorry everyone, I sent my last message to the list by mistake...

    Marcin

    On 11/06/2008, at 7:58 AM, Marcin Skladaniec wrote:

    > there is no simple way, see what I did in allRecordsCount in
    > ListController. Yo wont translate IN statement and other easily though
    > Marcin
    >
    > On 10/06/2008, at 4:26 PM, Lachlan Deck wrote:
    >
    >> Hi there,
    >>
    >> (question related to ROP)
    >>
    >> say I've got an Expression (whether complex or otherwise) and I
    >> want to utilise that Expression in a NamedQuery or SQLTemplate...
    >> what's the easiest way to transform the expression to an sql
    >> equivalent string? (i.e., such that, e.g.,, boolean values are
    >> transformed from say true to 1 (if using an int column), dates are
    >> formatted appropriately etc, comparison operators are transformed
    >> (e.g., != to <>) etc.
    >>
    >> I see that there's a QueryAssembler and QualifierTranslator etc,
    >> but what I'm looking for, I guess, is a something like
    >> expression.toSQLString(baseEntity).
    >>
    >> Any suggestions?
    >>
    >> Thanks.
    >>
    >> with regards,
    >> --
    >>
    >> Lachlan Deck
    >>
    >





    This archive was generated by hypermail 2.0.0 : Tue Jun 10 2008 - 19:55:03 EDT