package MyApp::Schema::Result::Play; use base qw/DBIx::Class::Core/; __PACKAGE__->table('play'); __PACKAGE__->add_columns( id => {data_type => 'integer',is_auto_increment => 1,}, context => {data_type => 'text'}, ); __PACKAGE__->has_many( comments => 'MyApp::Schema::Result::Comment', 'XXX' # what can go here? shall I add a FK_id in "comment"? );