Hi,

I'm trying to use DBIx::Class::InflateColumn to inflate some date columns,
so I put that on the model (it's a Catalyst App attacking a MySQL DB).

__PACKAGE__->inflate_column('creation_time', {
        inflate => sub { DateTime::Format::MySQL->parse_datetime(shift); },
        deflate => sub { DateTime::Format::MySQL->format_datetime(shift); },
    });

It works well, but I have to access to this column using
get_inflated_column("creation_time"). I would like to get the inflated
result for each request, so doing simply a get_column("creation_time") would
be enough.

I couldn't find a way to do that, so now I'm trying to overload the
inflate_result method, so it will parse each row and each column inflating
the desired ones. 

Do you think it is the correct way? Am I reinventing the wheel?

TIA!

Eduard Giménez
CAPSiDE 
Systems Engineer
[EMAIL PROTECTED]


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to