Re: SQLTemplate / inExp

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Feb 06 2006 - 18:09:02 EST

  • Next message: Cris Daniluk: "Re: SQLTemplate / inExp"

    For now Velocity #foreach is your friend.

    Also I would happily commit a patch to the
    org.objectstyle.cayenne.access.jdbc.BindDirective that would
    internally expand a list of objects the the comma-separated syntax :-)

    So that you could write "WHERE field IN (#bind($list CHAR))"

    Andrus

    On Feb 6, 2006, at 3:43 PM, Cris Daniluk wrote:

    > Apologies if I've overlooked something simple, but for the life of me
    > I can't figure out how to bind a list to a query using something like
    > #bind().
    >
    > I'd basically like to do a simple IN query:
    >
    > SELECT * FROM table WHERE field IN ($list)
    >
    > It doesn't seem like SQLTemplateProcessor and BindDirective support it
    > now, but it seems like it could by simply detecting Collection and
    > making a few simple changes to the query output.
    >
    > Is there another way?
    >
    > Cris
    >



    This archive was generated by hypermail 2.0.0 : Mon Feb 06 2006 - 18:09:05 EST