Initial commit of DBIx::Class (experimental Class::DBI-inspired ORM)
[dbsrgits/DBIx-Class.git] / t / testlib / MyFilm.pm
CommitLineData
ea2e61bf 1package MyFilm;
2
3BEGIN { unshift @INC, './t/testlib'; }
4use base 'MyBase';
5use MyStarLink;
6
7use strict;
8
9__PACKAGE__->set_table();
10__PACKAGE__->columns(All => qw/filmid title/);
11__PACKAGE__->has_many(_stars => 'MyStarLink');
12__PACKAGE__->columns(Stringify => 'title');
13
14sub _carp { }
15
16sub stars { map $_->star, shift->_stars }
17
18sub create_sql {
19 return qq{
20 filmid TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
21 title VARCHAR(255)
22 };
23}
24
251;
26