X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FEmployee.pm;h=dde6fd3be5b5659c036e1801fa1bc5d1627d87ef;hb=d931aae121a543895df014a8416f5b1f698c00f8;hp=9bf015a1c38bd4fc756f2a5196acbfd840c1b036;hpb=660cf1be74795a5a5784f413741816413a724c1a;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/Employee.pm b/t/lib/DBICTest/Schema/Employee.pm index 9bf015a..dde6fd3 100644 --- a/t/lib/DBICTest/Schema/Employee.pm +++ b/t/lib/DBICTest/Schema/Employee.pm @@ -1,6 +1,9 @@ -package # hide from PAUSE +package # hide from PAUSE DBICTest::Schema::Employee; +use warnings; +use strict; + use base qw/DBICTest::BaseResult/; __PACKAGE__->load_components(qw( Ordered )); @@ -32,18 +35,20 @@ __PACKAGE__->add_columns( size => 100, is_nullable => 1, }, + encoded => { + data_type => 'integer', + is_nullable => 1, + }, ); __PACKAGE__->set_primary_key('employee_id'); __PACKAGE__->position_column('position'); -#__PACKAGE__->add_unique_constraint(position_group => [ qw/position group_id/ ]); +# Do not add unique constraints here - different groups are used throughout +# the ordered tests -__PACKAGE__->mk_classdata('field_name_for', { - employee_id => 'primary key', - position => 'list position', - group_id => 'collection column', - name => 'employee name', +__PACKAGE__->belongs_to (secretkey => 'DBICTest::Schema::Encoded', 'encoded', { + join_type => 'left' }); 1;