You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Peter Schröder <Pe...@freenet-ag.de> on 2006/12/05 11:36:15 UTC

mysql date

hi there,

first of all the bug-tracking link on page http://incubator.apache.org/cayenne/how-can-i-help.html is broken :-( but i found it through google.

but i didnt find an issue about my problem:

we have a lot of old data stored in our mysql-database. there are lots of date-fields with date of '0000-00-00 00:00:00' (which should in deed be 'null') which cause cayenne to fail on fetching data-objects, cause it cant convert the date: Value '0000-00-00' can not be represented as java.sql.Timestamp.
do i have to update all these fields to null, so that cayenne can work properly?

kind regards
peter

Re: mysql date

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Dec 5, 2006, at 12:36 PM, Peter Schröder wrote:

> hi there,
>
> first of all the bug-tracking link on page http:// 
> incubator.apache.org/cayenne/how-can-i-help.html is broken :-( but  
> i found it through google.

Thanks for pointing it out. I fixed it on the site - it will be  
published within an hour.

> we have a lot of old data stored in our mysql-database. there are  
> lots of date-fields with date of '0000-00-00 00:00:00' (which  
> should in deed be 'null') which cause cayenne to fail on fetching  
> data-objects, cause it cant convert the date: Value '0000-00-00'  
> can not be represented as java.sql.Timestamp.
> do i have to update all these fields to null, so that cayenne can  
> work properly?

What is the exception? I would assume this is thrown at the driver  
level, not Cayenne, but if you can provide more details, maybe there  
is a way for us to create a workaround.

Andrus