Commit | Line | Data |
c6d74d3e |
1 | package # hide from PAUSE |
2 | DBICTest::Schema::TreeLike; |
38a0b4ff |
3 | |
ff657a43 |
4 | use base qw/DBIx::Class::Core/; |
38a0b4ff |
5 | |
6 | __PACKAGE__->table('treelike'); |
7 | __PACKAGE__->add_columns( |
8 | 'id' => { data_type => 'integer', is_auto_increment => 1 }, |
9 | 'parent' => { data_type => 'integer' }, |
cb561d1a |
10 | 'name' => { data_type => 'varchar', |
11 | size => 100, |
12 | }, |
38a0b4ff |
13 | ); |
14 | __PACKAGE__->set_primary_key(qw/id/); |
c037c03a |
15 | __PACKAGE__->belongs_to('parent', 'DBICTest::Schema::TreeLike', |
38a0b4ff |
16 | { 'foreign.id' => 'self.parent' }); |
17 | |
18 | 1; |