views:

47

answers:

1

I currently use the DBIx::Class::InflateColumn::DateTime plugin to inflate my date columns to DateTime objects and deflate my DateTime objects to MySQL date values.

I want to store the age of an individual (I cannot use DOB) and for this the years, months or days values may be 0. Therefore I am using a DateTime::Duration object. Thing is the plugin will fail if the value is not a valid date (and 0020-08-00 is not valid). Can I use the plugin, do I have to write my own or is there another way?

(BTW MySQL does allow such values - I am not concerned if it is 'invalid' - it works for what I need and I am not planning to change my RDBMS.)

A: 

So I ended writing my own InflateColumn module. You can find it on the CPAN

cubabit