Re: datetime fields?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sat May 14 2005 - 09:41:40 EDT

  • Next message: Robert Zeigler: "Re: datetime fields?"

    On May 14, 2005, at 1:01 AM, Robert Zeigler wrote:

    > From looking at the modeler, it appears that only date, time, and
    > timestamp fields are supported.

    This only means that date, time, and timestamp are the choices JDBC
    provides. MySQL itself can use any of its (compatible) column types. So
    you can map your column in Cayenne as (JDBC) "TIMESTAMP", but on MySQL
    end you can use (MySQL specific) type DATETIME, which I think is the
    type you are looking for - nullable date + time.

    The only caveat is when you use CayenneModeler for schema generation,
    you'll need to save the generated script, replace TIMESTAMP references
    (a default mapping from JDBC to MySQL types used by Cayenne) to
    DATETIME, and run it manually. Hopefully this part will become
    customizable in Cayenne 1.2.

    Andrus



    This archive was generated by hypermail 2.0.0 : Sat May 14 2005 - 09:41:42 EDT