1 package MyApp::Schema::Result::Artist;
6 use base qw( DBIx::Class::Core );
8 __PACKAGE__->table('artist');
10 __PACKAGE__->add_columns(
12 data_type => 'integer',
13 is_auto_increment => 1
20 __PACKAGE__->set_primary_key('artistid');
22 __PACKAGE__->add_unique_constraint([qw( name )]);
24 __PACKAGE__->has_many('cds' => 'MyApp::Schema::Result::Cd', 'artistid');