1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2 use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
9 use lib 't/cdbi/testlib';
12 package # hide from PAUSE
15 use base 'DBIC::Test::SQLite';
18 __PACKAGE__->set_table('Movies');
19 __PACKAGE__->columns(All => qw(id title));
21 # Disables the implicit autoinc-on-non-supplied-pk behavior
22 # (and the warning that goes with it)
23 # This is the same behavior as it was pre 0.082900
24 __PACKAGE__->column_info('id')->{is_auto_increment} = 0;
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";