[Dbix-class] DateTime independant from the database
hallouina-dbix at yahoo.fr
hallouina-dbix at yahoo.fr
Wed May 21 23:21:29 BST 2008
Hi everybody,
I'm new and happy to use DBIx.
I'm creating
a little Catalyst application. I have a forms and use FormFu to create
it. I full it almost completly and need to complete 2 others date field
int the controller. I have created a sql file then generate my schema.
I never modified my schema in catalyst.
I want to keep a model that
stay database independant. So I want to used
DBIx::Class::InflateColumns::DateTime (as Jess Robinson advise me on
irc). But the documentation about this module is not very expensive.
On my Project.pm I have this warning :
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-05-01 01:36:27
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tS5sQsszV7IB1uRDv4CfdA
So
I try to add
__PACKAGE__->load_components('InflateColumn::DateTime'); at the end
of Project.pm . And as the documentation say, to add a date I should do
something like :
__PACKAGE__->add_columns(
datecreation => { data_type => 'datetime' }
);
But the field "datecreation" already exist and as say the warning, I sould not modify anything above.
So how could I do to solve my problem please ? I just want to add 2 dates before saving my form.
Have someone a way, a tutorial or some clue to help me please ?
Thanks for your help,
Antoine.
__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail
More information about the DBIx-Class
mailing list