The problem is that you're using qw in the list that you're passing to add_columns. What you're actually passing is the list ( 'id', 'token', 'old_invoice', 'date', '=>', '{data_type', '=>', \'datetime\'}' )
In order to pass a list of column-name => hashref pairs, you'll need to write it like this:
__PACKAGE__->add_columns(id => { }, token => { }, old_invoice => { }, date => {data_type => 'datetime'} );
Alternatively, you can pass a list of the plain column names (no hashrefs) and specify the date column type later:
__PACKAGE__->add_columns(qw/id token old_invoice/); __PACKAGE__->add_columns(date => {data_type => 'datetime'});
Update: Fixed typos
In reply to Re: Selecting date using DBIx::Class and InflateColumn
by friedo
in thread Selecting date using DBIx::Class and InflateColumn
by nybble_1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |