5 eval "use DBIx::Class::CDBICompat;";
6 plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@")
11 use lib 't/cdbi/testlib';
15 package # hide from PAUSE
18 use base 'DBIC::Test::SQLite';
21 __PACKAGE__->set_table('Movies');
22 __PACKAGE__->columns(All => qw(id title));
26 id INTEGER PRIMARY KEY AUTOINCREMENT,
32 my $film = MyFilm->create({ title => "For Your Eyes Only" });
35 my $new_film = $film->copy;
37 isnt $new_film->id, $film->id, "copy() gets new primary key";
39 $new_film = $film->copy(42);
40 is $new_film->id, 42, "copy() with new id";