Re: ExtendedTypes (was: adding postgresql data types)

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Jul 05 2004 - 12:09:20 EDT

  • Next message: Andrus Adamchik: "Re: Database reconnect support? [Oracle 9i]"

    As the datatype doesn't know much about its surroundings when the
    validation is called, I figured it can't make any assumptions, and should
    just let it go...

    On the other hand as each ExtendedDataType is always used to describe a
    particular Java class, we should probably throw an exception if the value
    is of a different type. Good catch - I may need to look at this.

    Andrus

    > One thing is still puzzling. I was looking at
    > cayenne.access.types.CharType for an example to follow. It has:
    >
    > public boolean validateProperty(...) {
    >
    > if (!(value instanceof String)) {
    > return true;
    > }
    > }
    >
    > Why is it saying a non-String is okay? Is it depending on some other
    > code to catch a bad type?
    >
    > Thanks.



    This archive was generated by hypermail 2.0.0 : Mon Jul 05 2004 - 12:09:21 EDT