X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-DBIx-Class-ResultSet-RecursiveUpdate;a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FEmployee.pm;fp=t%2Flib%2FDBICTest%2FSchema%2FEmployee.pm;h=7beb83328a57f5a5bcbd82b4a7b1a3d099db410d;hp=0000000000000000000000000000000000000000;hb=584713f437ffa9390821a0580ed368aa22fb552e;hpb=d93b1239cb7de482ac79a091d7daa67115596306 diff --git a/t/lib/DBICTest/Schema/Employee.pm b/t/lib/DBICTest/Schema/Employee.pm new file mode 100644 index 0000000..7beb833 --- /dev/null +++ b/t/lib/DBICTest/Schema/Employee.pm @@ -0,0 +1,45 @@ +package # hide from PAUSE + DBICTest::Schema::Employee; + +use base 'DBIx::Class::Core'; + +__PACKAGE__->load_components(qw( Ordered )); + +__PACKAGE__->table('employee'); + +__PACKAGE__->add_columns( + employee_id => { + data_type => 'integer', + is_auto_increment => 1 + }, + position => { + data_type => 'integer', + }, + group_id => { + data_type => 'integer', + is_nullable => 1, + }, + group_id_2 => { + data_type => 'integer', + is_nullable => 1, + }, + name => { + data_type => 'varchar', + size => 100, + is_nullable => 1, + }, +); + +__PACKAGE__->set_primary_key('employee_id'); +__PACKAGE__->position_column('position'); + +#__PACKAGE__->add_unique_constraint(position_group => [ qw/position group_id/ ]); + +__PACKAGE__->mk_classdata('field_name_for', { + employee_id => 'primary key', + position => 'list position', + group_id => 'collection column', + name => 'employee name', +}); + +1;