7 eval "use DBIx::Class::CDBICompat;";
8 plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@")
17 package # hide from PAUSE
20 use base 'DBIx::Class::Test::SQLite';
23 __PACKAGE__->set_table('Movies');
24 __PACKAGE__->columns(All => qw(id title));
28 id INTEGER PRIMARY KEY AUTOINCREMENT,
34 my $film = MyFilm->create({ title => "For Your Eyes Only" });
37 my $new_film = $film->copy;
39 isnt $new_film->id, $film->id, "copy() gets new primary key";
41 $new_film = $film->copy(42);
42 is $new_film->id, 42, "copy() with new id";