RE: Validation

From: Weddle, Anthony (Anthony.Weddl..luescopesteel.com)
Date: Mon Apr 13 2009 - 19:52:21 EDT

  • Next message: Andrus Adamchik: "Re: How to Split Tables"

    Thanks, Robert. That looks like a good plan.

    Tony

    -----Original Message-----
    From: Robert Zeigler [mailto:robert.zeigle..oxanemy.com]
    Sent: Tuesday, 14 April 2009 11:38 a.m.
    To: use..ayenne.apache.org
    Subject: Re: Validation

    Constraint information is available by examining the ObjEntity and
    DbEntity objects corresponding to the given object class.
    I used this in the tapestry5-cayenne integration module (t5cayenne)
    to have tapestry automatically pick up the relevant data constraints
    Note: currently, t5cayenne supports the required constraint for any
    field type, the maxlength constraint for only string types, and no
    other constraints. This is due to what I was interested in supporting
    at the time I wrote it rather than to some fundamental limitation; any
    remaining constraints will likely be added at some point in the
    future. All of those caveats notwithstanding, you can take a look at
    the code for ideas:

    http://code.google.com/p/tapestry5-cayenne/source/browse/trunk/tapestry5
    -cayenne-core/src/main/java/com/googlecode/tapestry5cayenne/services/Cay
    enneConstraintGenerator.java

    Robert



    This archive was generated by hypermail 2.0.0 : Mon Apr 13 2009 - 19:52:27 EDT