Fix silent failures on autoinc PK without an is_auto_increment attribute
[dbsrgits/DBIx-Class.git] / t / cdbi / testlib / ColumnObject.pm
CommitLineData
7ad80222 1package # Hide from PAUSE
2 ColumnObject;
3
4use strict;
5use warnings;
6
7use base 'DBIC::Test::SQLite';
8use Class::DBI::Column;
9
10__PACKAGE__->set_table('column_object');
11
12__PACKAGE__->columns( Primary => 'id' );
13__PACKAGE__->columns( All => (
14 'id',
15 'columna',
16 'columnb',
17 Class::DBI::Column->new('columna' => {accessor => 'columna_as_read'}),
18 Class::DBI::Column->new('columnb' => {mutator => 'columnb_as_write'}),
19));
20
7305f6f9 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;
25
7ad80222 26sub create_sql {
27 return qq{
28 id INTEGER PRIMARY KEY,
29 columna VARCHAR(20),
30 columnb VARCHAR(20)
31 }
32}
33
341;