1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
14 use base 'DBIx::Class::Core';
15 __PACKAGE__->table('foo');
16 __PACKAGE__->set_primary_key('bar')
17 } qr/No such column 'bar' on source 'foo' /,
18 'proper exception on non-existing column as PK';
22 use base 'DBIx::Class::Core';
23 __PACKAGE__->table('foo');
24 __PACKAGE__->add_columns(
26 bar => { is_nullable => 1 },
28 __PACKAGE__->set_primary_key(qw(foo bar))
29 } qr/Primary key of source 'foo' includes the column 'bar' which has its 'is_nullable' attribute set to true/,
30 'proper exception on is_nullable column as PK';