Commit | Line | Data |
---|---|---|
7abe3af2 | 1 | package MTITest::Result::Bar; |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | use parent qw(MTITest::Result::Foo); | |
6 | ||
7 | __PACKAGE__->table('bar'); | |
8 | ||
9 | __PACKAGE__->add_columns( | |
10 | b => { data_type => 'integer' } | |
11 | ); | |
12 | ||
490d5481 | 13 | __PACKAGE__->belongs_to( |
14 | 'b_thang', | |
15 | 'MTITest::Result::JustATable', | |
16 | { 'foreign.id' => 'self.b' }, | |
17 | ); | |
18 | ||
19 | __PACKAGE__->has_many( | |
20 | 'foos', | |
21 | 'MTITest::Result::Foo', | |
22 | { 'foreign.a' => 'self.id' } | |
23 | ); | |
24 | ||
7abe3af2 | 25 | 1; |