Re: "Is" Expression

2008-05-04 Thread Tore Halset
On 30. april. 2008, at 17.08, Andrus Adamchik wrote: IIRC Tore added boolean constant parsing to 3.0 some time ago. I could be wrong of course. Are you on 2.0.x? That was true/false as an expression element, not as a value. See jira for examples. http://issues.apache.org/cayenne/browse/C

Re: "Is" Expression

2008-04-30 Thread Andrus Adamchik
Looking at the code, looks like it only works as a standalone condition, e.g. "a = 1 and true": https://issues.apache.org/cayenne/browse/CAY-696 So yeah, boolean literals are not supported as condition operands :-/ Anyone else encountering an SVN issue right now? It's been up and down t

Re: "Is" Expression

2008-04-30 Thread Michael Gentry
No, I'm pretty current (I updated here sometime last week). I just rebuilt and re-ran and still see the same issue. It is dying in Expression.fromString() -- it bails on the false in "isActive = false" (or true): org.apache.cayenne.exp.parser.ParseException: Encountered "false" at line 1, column

Re: "Is" Expression

2008-04-30 Thread Andrus Adamchik
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(1); parameter

Re: "Is" Expression

2008-04-30 Thread Michael Gentry
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(1); parameters.put("value", Boolean.TRUE); query = new Select

Re: "Is" Expression

2008-04-29 Thread Andrus Adamchik
Try this: Expression expression = ExpressionFactory.matchExp("actif", Boolean.TRUE); I don't remember how good was the boolean support in 2.0.x, but the above works for me with Cayenne 3.0 and MySQL 5 rather well. Andrus On Apr 29, 2008, at 11:34 AM, Support Technique C3T wrote: Hi

"Is" Expression

2008-04-29 Thread Support Technique C3T
Hi I'm new with this great ORM and I'm looking for a way to select rows where a column is true. I use Cayenne 2.0.4 with MySQL 5.0 I created a table with a boolean column. I inserted rows in it with Cayenne. But i wanted to select rows but I didn't find a ExpressionFactory method like tha