RE: Compound expressions Problem and solution

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Mon May 16 2005 - 15:44:15 EDT

  • Next message: Andrus Adamchik: "Re: Struts Plugin"

    This seems to bite a lot of people. Expressions are non-mutable (like
    String). I thought we had this documented on the wiki (as an FAQ), but
    maybe not. Could probably stand to be better documented elsewhere
    (maybe in a big red/bold/flashing font).
     
    /dev/mrg

            -----Original Message-----
            From: Joshua Pyle [mailto:joshua.t.pyl..mail.com]
            Sent: Monday, May 16, 2005 1:44 PM
            To: cayenne-use..bjectstyle.org
            Subject: Compound expressions Problem and solution
            
            
            One of our developers, new to cayenne, recently ran in to this
    problem...
            
            
            (didn't work)
            Expression exp =
    ExpressionFactory.matchExp(AuthUserAttribute.ATTR_NAME_PROPERTY,
    testAttributeName);
            exp.andExp
    (ExpressionFactory.matchExp(AuthUserAttribute.USERNAME_PROPERTY,
    testUser));
            
            
            (works)
            Expression exp =
    ExpressionFactory.matchExp(AuthUserAttribute.ATTR_NAME_PROPERTY,
    testAttributeName);
            exp = exp.andExp(
    ExpressionFactory.matchExp(AuthUserAttribute.USERNAME_PROPERTY,
    testUser));
             
            It seem smalll but could cost a developer significant time.
            
            
            --
            Joshua T. Pyle
            Go has always existed.
             



    This archive was generated by hypermail 2.0.0 : Mon May 16 2005 - 15:44:24 EDT