New collection_column feature with working tests.
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Employee / PositionedAdjacencyList.pm
1 package # hide from PAUSE 
2     DBICTest::Schema::Employee::PositionedAdjacencyList;
3
4 use base 'DBIx::Class';
5
6 __PACKAGE__->load_components(qw(
7     Tree::AdjacencyList
8     Positioned
9     PK::Auto
10     Core
11 ));
12
13 __PACKAGE__->table('employees_positioned_adjacencylist');
14
15 __PACKAGE__->add_columns(
16     employee_id => {
17         data_type => 'integer',
18         is_auto_increment => 1
19     },
20     parent_id => {
21         data_type => 'integer',
22         is_nullable => 1,
23     },
24     position => {
25         data_type => 'integer',
26     },
27     name => {
28         data_type => 'varchar',
29         size      => 100,
30         is_nullable => 1,
31     },
32 );
33
34 __PACKAGE__->set_primary_key('employee_id');
35 __PACKAGE__->position_column('position');
36 __PACKAGE__->parent_column('parent_id');
37
38 __PACKAGE__->mk_classdata('field_name_for', {
39     employee_id => 'primary key',
40     parent_id   => 'parent id',
41     position    => 'list position',
42     name        => 'employee name',
43 });
44
45 1;