added more many_to_many tests and changed add_to_rel to accept linking table column...
[dbsrgits/DBIx-Class-Historic.git] / t / testlib / MyFoo.pm
CommitLineData
c6d74d3e 1package # hide from PAUSE
2 MyFoo;
ea2e61bf 3
4BEGIN { unshift @INC, './t/testlib'; }
5use base 'MyBase';
6
7use strict;
8
9__PACKAGE__->set_table();
10__PACKAGE__->columns(All => qw/myid name val tdate/);
11__PACKAGE__->has_a(
12 tdate => 'Date::Simple',
13 inflate => sub { Date::Simple->new(shift) },
14 deflate => 'format',
15);
16__PACKAGE__->find_column('tdate')->placeholder("IF(1, CURDATE(), ?)");
17
18sub create_sql {
19 return qq{
20 myid mediumint not null auto_increment primary key,
21 name varchar(50) not null default '',
22 val char(1) default 'A',
23 tdate date not null
24 };
25}
26
271;
28