[Maypole] mysql-type "time" can be displayed, but not edited

Simon Neininger simon@neininger.net
Sat, 17 Jul 2004 21:45:19 +0200


Hi!

I have a Maypole-Webapplication which uses the type "time" in the
MySQL-Database. If I add/edit objects, the time is ignored. In the logfile
of the MySQL-Server I've seen that the fileds of type time aren't includet
in the INSERT/UPDATE-Statements. However, if I enter the time with a
mysql-client, its displayed correctly in the webapplication.

I tried some "autoinflate"-stuff, like on
http://search.cpan.org/~tmtm/Class-DBI-mysql-0.23/lib/Class/DBI/mysql.pm 
but I think I've got it wrong.

package seeueberquerung;
use base 'Apache::MVC';
use Class::DBI::mysql;
use Class::DBI::Loader::Relationship;
use Time::Piece;
use Time::Piece::MySQL;

Class::DBI::mysql->autoinflate(column_type => 'Inflation::Class');
Class::DBI::mysql->autoinflate(time => 'Time::Piece');
Class::DBI::mysql->autoinflate(dates => 'Time::Piece');
Class::DBI::mysql->autoinflate(date => 'Time::Piece');
Class::DBI::mysql->autoinflate(datetime => 'Time::Piece');
Class::DBI::mysql->autoinflate(timestamp => 'Time::Piece');
seeueberquerung->setup("dbi:mysql:database=seeueberquerung;host=aromat;user=simon");
seeueberquerung->config->{template_root} = "/var/www/templates/factory";
seeueberquerung->config->{uri_base} = "http://neininger.net/seeueberquerung/";
seeueberquerung->config->{rows_per_page} = 5;
seeueberquerung->config->{loader}->relationship($_) for  ("a kategorie has teilnehmer");
1;


Gruss

Simon N.