package MyApp::Schema::Result::Artist; use base qw/DBIx::Class::Core/; # this ResultSource is going to be based on a table, not a view __PACKAGE__->table('artist'); # the table has these columns __PACKAGE__->add_columns(qw/ artistid name /); # and this is the pkey __PACKAGE__->set_primary_key('artistid'); #### my $result_source = $schema->resultset('Artist')->result_source; my @list_of_columns_in_pkey = $result_source->primary_columns; #### my $result_source = $schema->source('Artist'); my @list_of_columns_in_pkey = $result_source->primary_columns;