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