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
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 that :
Expression expression = ExpressionFactory.isExp("actif", true);
So I tried workarounds
Expression expression = Expression.fromString("actif is true");
doesn't work
I tried Expression expression = ExpressionFactory.matchExp("actif",
"1") : that doesn't work
neither Expression expression = Expression.fromString("actif == 1");
Could youn help me ?
Thank you
Best regards