Newer Older
22 lines | 0.419kb
- added experimental DBIx::C...
Yuki Kimoto authored on 2011-03-11
1
package MyModel7::table1;
2

            
3
use base 'MyModel7';
4

            
5
__PACKAGE__->attr(
6
    primary_key => sub { ['key1'] },
7
    column => sub {
8
        my $self = shift;
9
        
10
        return [
11
            $self->column_clause,
12
            $self->model('table2')->column_clause(prefix => 'table2__')
13
        ];
14
    },
15
    join => sub {
16
        [
17
            'left outer join table2 on table1.key1 = table2.key1'
18
        ]
19
    },
20
);
21

            
22
1;