"Is" Expression

From: Support Technique C3T (suppor..3t.fr)
Date: Tue Apr 29 2008 - 04:34:54 EDT

  • Next message: Andrus Adamchik: "Re: "Is" Expression"

    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



    This archive was generated by hypermail 2.0.0 : Tue Apr 29 2008 - 04:40:32 EDT