[Dbix-class] how to use one result pageck for many tables that
have same structural
Alexander Hartmaier
alexander.hartmaier at t-systems.at
Fri Apr 2 14:20:55 GMT 2010
Just like you would do with every perl class.
You could define a base class and subclass from it or use Moose roles.
--
Best regards, Alex
Am Freitag, den 02.04.2010, 10:35 +0200 schrieb 刘强:
> package MyDB::Schema::Result::Artist;
> use base qw/DBIx::Class::Core/;
>
> __PACKAGE__->table('artist');
> __PACKAGE__->add_columns(qw/ artistid name /);
> __PACKAGE__->set_primary_key('artistid');
>
>
> for example we have talbes: artist1, artist2....artist10
> do we need to create 10 package?
> how to use one package,just change the table name dynamicly?
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
More information about the DBIx-Class
mailing list