Does 'like' work with parameterized expressions?

From: Gentry, Michael (michael_gentr..anniemae.com)
Date: Fri Nov 05 2004 - 17:49:18 EST

  • Next message: Robert Zeigler: "Re: no datamap found???"

    If you have something like:

    final Expression expression = Expression.fromString("referenceString
    like '%$rs'");

    Map map = new HashMap(1);

    map.put("rs", "foo");

    SelectQuery query = new SelectQuery(My.class,
    expression.expWithParameters(map));

    Does the Expression class correctly parse the "like '%$rs'"? In my SQL
    logging I see this as my binding:

    ... (t1.referenceString LIKE ?) ... [bind: '%$rs'] - prepared in 10 ms.

    Where I'd expect to see:

    ... (t1.referenceString LIKE ?) ... [bind: '%foo'] - prepared in 10 ms.

    /dev/mrg



    This archive was generated by hypermail 2.0.0 : Fri Nov 05 2004 - 17:49:24 EST