nybble_1 has asked for the wisdom of the Perl Monks concerning the following question:
I am able to save date data flawlessly; I am also able to retrieve data from this field when I remove the datetime datatype from my column declaration. My Class is:SELECT me.id, me.token, me.old_invoice, me.date, me.=>, me.{data_type, + me.'datetime'} FROM invoices me ...
My code retrieving the result set is:package SEM::Main::Invoices; use base qw/DBIx::Class/; __PACKAGE__->load_components(qw/PK::Auto InflateColumn::DateTime C +ore/); __PACKAGE__->table('invoices'); __PACKAGE__->add_columns(qw/id token old_invoice date => {data_type => 'datetime'} /); __PACKAGE__->set_primary_key('id'); 1;
Any thoughts would be welcome;my $rowI = $schema->resultset("Invoices")->search({token=>$sTarget +})->first;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Selecting date using DBIx::Class and InflateColumn
by friedo (Prior) on Jul 11, 2008 at 20:20 UTC | |
by nybble_1 (Novice) on Jul 11, 2008 at 22:11 UTC |