Addinng Validation failures

From: Fredrik Liden (flide..ranslate.com)
Date: Tue Mar 15 2005 - 18:24:46 EST

  • Next message: Mike Kienenberger: "Re: Reengineer problem: ORA-00600"

    Hi,

    I'm trying to create some custom validation. According the the
    documentation
    http://www.objectstyle.org/cayenne/userguide/dataobjects/validation.html
    the following line should be added

    //
    validationResult.addFailure(this,Budget_entry.DESCRIPTION_PROPERTY,"Pain
    ting price must be greater than zero.");

    however that doesn't seem to work. I tried this instead and this seems
    to work.
    validationResult.addFailure(new
    BeanValidationFailure(this,Budget_entry.DESCRIPTION_PROPERTY,"Painting")
    );

    Is this correct? In case there are any other rookies out there like
    myself.

    Thanks!

    /Fredrik



    This archive was generated by hypermail 2.0.0 : Tue Mar 15 2005 - 18:23:57 EST