8 my $schema = DBICTest->init_schema();
10 my $art = $schema->resultset("Artist")->find(1);
12 isa_ok $art => 'DBICTest::Artist';
14 my $name = 'Caterwauler McCrae';
16 ok($art->name($name) eq $name, 'update');
19 my @changed_keys = $art->is_changed;
20 is( scalar (@changed_keys), 0, 'field changed but same value' );
23 $art->discard_changes;
25 ok($art->update({ artistid => 100 }), 'update allows pk mutation');
27 is($art->artistid, 100, 'pk mutation applied');
29 my $art_100 = $schema->resultset("Artist")->find(100);
30 $art_100->artistid(101);
31 ok($art_100->update(), 'update allows pk mutation via column accessor');