Twan Kogels <twa..wansoft.com> wrote:
> Mysql also has a DATETIME type, that's used for date+time values, for
> example "10-10-2004 10:29". I've looked into the Modeler but could not
find
> the DATETIME type for a DBentity. I've found DATE (only used for dates
> "10-10-2004") and TIME (only used for time "10:29").
>
> If you want to use date and time then the only choice seems to TIMESTAMP,
> but that type has very strange non standard effects in mysql.
>
> Does cayenne supports DATETIME type of mysql or is there any other way
> around the TIMESTAMP problem?
You can change what database types are used for any particular adaptor by
changing org/objectstyle/cayenne/dba/mysql/types.xml
If you're working with the source, you can just modify the file directly.
If not, you can create your own adaptor subclass that uses your own
types.xml file, and specify the subclass.
<jdbc-type name="TIMESTAMP">
<db-type name="DATETIME"/>
</jdbc-type>
If this works as expected, you might submit a JIRA issue (which should look
similar to this one for Oracle that changes from DATE to TIMESTAMP.)
http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-71
This archive was generated by hypermail 2.0.0 : Thu Oct 14 2004 - 15:42:44 EDT