12 use base 'DBIx::Class::Core';
13 __PACKAGE__->table('foo');
14 __PACKAGE__->set_primary_key('bar')
15 } qr/No such column 'bar' on source 'foo' /,
16 'proper exception on non-existing column as PK';
20 use base 'DBIx::Class::Core';
21 __PACKAGE__->table('foo');
22 __PACKAGE__->add_columns(
24 bar => { is_nullable => 1 },
26 __PACKAGE__->set_primary_key(qw(foo bar))
27 } qr/Primary key of source 'foo' includes the column 'bar' which has its 'is_nullable' attribute set to true/,
28 'proper exception on is_nullable column as PK';