first documented version
[dbsrgits/DBIx-Class-ParameterizedJoinHack.git] / t / lib / My / Schema / Result / Task.pm
1 package My::Schema::Result::Task;
2
3 use strict;
4 use warnings;
5 use base qw(DBIx::Class::Core);
6
7 __PACKAGE__->table('tasks');
8
9 __PACKAGE__->add_columns(
10   id => { data_type => 'integer', is_nullable => 0, is_auto_increment => 1 },
11   summary => { data_type => 'text', is_nullable => 0 },
12   assigned_to_id => { data_type => 'integer', is_nullable => 0 },
13   urgency => { data_type => 'integer', is_nullable => 0 },
14 );
15
16 __PACKAGE__->set_primary_key('id');
17
18 __PACKAGE__->belongs_to(
19   assigned_to => 'My::Schema::Result::Person',
20   { 'foreign.id' => 'self.assigned_to_id' }
21 );
22
23 1;