On Apr 30, 2008, at 5:57 PM, Michael Gentry wrote:

Andrus,

I was thinking "someBoolean = true" (or false) would work, but it
doesn't.  However, it does work if you evaluate the expression:

   expression = Expression.fromString("isActive = $value");
   parameters = new HashMap<String, Boolean>(1);
   parameters.put("value", Boolean.TRUE);
   query = new SelectQuery(TestBool.class,
expression.expWithParameters(parameters));

That worked just fine for me: WHERE t0.isActive = ? [bind: 1- >isActive:'true']

Shouldn't a normal Expression.fromString() be allowed to specify "=
true" or "= false"?  Can't we internally convert true/false into
Boolean.TRUE/Boolean.FALSE?

IIRC Tore added boolean constant parsing to 3.0 some time ago. I could be wrong of course. Are you on 2.0.x?

Andrus

Reply via email to