Commit | Line | Data |
---|---|---|
ea2e61bf | 1 | package MyStar; |
2 | ||
3 | BEGIN { unshift @INC, './t/testlib'; } | |
4 | use base 'MyBase'; | |
5 | ||
6 | use strict; | |
7 | ||
8 | __PACKAGE__->set_table(); | |
9 | __PACKAGE__->columns(All => qw/starid name/); | |
10 | __PACKAGE__->has_many(films => [ MyStarLink => 'film' ]); | |
11 | ||
12 | # sub films { map $_->film, shift->_films } | |
13 | ||
14 | sub create_sql { | |
15 | return qq{ | |
16 | starid TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
17 | name VARCHAR(255) | |
18 | }; | |
19 | } | |
20 | ||
21 | 1; | |
22 |