object with toMany.size() == 0?

From: Arturo Pérez (apere..ayesinc.com)
Date: Fri Oct 06 2006 - 22:51:42 EDT

  • Next message: Andrus Adamchik: "Re: object with toMany.size() == 0?"

    Hi all,

    I thought I saw this somewhere on the wiki but I can't find it.

    I have an object with a toMany relation (e.g. house.getResidents()).

    How do I write an Expression to find all the houses with no residents?

    I know this doesn't work:
    Expression exp = ExpressionFactory.matchExp("residents", null);

    and this doesn't work because the size() method doesn't follow bean
    convention:

    Expression exp = ExpressionFactory.matchExp("residents.size", new
    Integer(0));

    I would be much obliged...
    -arturo



    This archive was generated by hypermail 2.0.0 : Fri Oct 06 2006 - 22:52:27 EDT