Commit | Line | Data |
6ebf5cbb |
1 | package # hide from PAUSE |
2 | ViewDeps::Result::Bar; |
3 | |
4 | use strict; |
5 | use warnings; |
6 | use parent qw(ViewDeps::Result::Foo); |
7 | |
1e70d9dc |
8 | use ViewDeps::Result::Mixin; |
6ebf5cbb |
9 | |
10 | __PACKAGE__->table('bar'); |
11 | |
12 | __PACKAGE__->result_source_instance->depends_on( |
13 | { ViewDeps::Result::Mixin->result_source_instance->name => 1 } |
14 | ); |
15 | |
16 | __PACKAGE__->add_columns( |
17 | b => { data_type => 'integer' } |
18 | ); |
19 | |
20 | __PACKAGE__->belongs_to( |
1e70d9dc |
21 | 'table', |
6ebf5cbb |
22 | 'ViewDeps::Result::JustATable', |
23 | { 'foreign.id' => 'self.b' }, |
24 | ); |
25 | |
26 | __PACKAGE__->has_many( |
27 | 'foos', |
28 | 'ViewDeps::Result::Foo', |
1e70d9dc |
29 | { 'foreign.id' => 'self.id' } |
6ebf5cbb |
30 | ); |
31 | |
32 | 1; |