I'm using postgresql and storing my dates at ints. Latest CPAN releases of RDBO, Rose::DB and Rose::Object.
I have a column defined like: complete => {type => 'epoch', default => '0', not_null => 1, time_zone => 'UTC'}, That works great until I load a record with complete = 0 and then try and save it without modifying the complete value. The issue appears to be that the DateTime inflate/deflate logic doesn't happen correctly for 0 values. It works fine for non-0 values. I tried tracing this through Rose::DB and Rose::DateTime but couldn't find where my problem is originating. Here's what happens though: $ perl -MMyDB -e 'my $obj = MyDB->new(id => 1)->load; \ $obj->complete(0); $obj->save' $ perl -MMyDB -e 'my $obj = MyDB->new(id => 1)->load; $obj->save' update() - DBD::Pg::st execute failed: ERROR: null value in column "complete" violates not-null constraint at -e line 1 Have I misconfigured my column somehow? -- Peter Karman . http://peknet.com/ . [EMAIL PROTECTED] ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object