Commit | Line | Data |
d2cee1fa |
1 | use strict; |
a2ed1a5f |
2 | use Test::More; |
d2cee1fa |
3 | |
a2ed1a5f |
4 | BEGIN { |
5 | eval "use DBIx::Class::CDBICompat;"; |
6 | plan $@ ? (skip_all => 'Class::Trigger and DBIx::ContextualFetch required') |
7 | : (tests=> 3); |
8 | } |
d2cee1fa |
9 | |
10 | package A; |
a2ed1a5f |
11 | @A::ISA = qw(DBIx::Class::CDBICompat); |
d2cee1fa |
12 | __PACKAGE__->columns(Primary => 'id'); |
13 | |
14 | package A::B; |
15 | @A::B::ISA = 'A'; |
16 | __PACKAGE__->columns(All => qw(id b1)); |
17 | |
18 | package A::C; |
19 | @A::C::ISA = 'A'; |
20 | __PACKAGE__->columns(All => qw(id c1 c2 c3)); |
21 | |
22 | package main; |
23 | is join (' ', sort A->columns), 'id', "A columns"; |
24 | is join (' ', sort A::B->columns), 'b1 id', "A::B columns"; |
25 | is join (' ', sort A::C->columns), 'c1 c2 c3 id', "A::C columns"; |