Commit | Line | Data |
c6d74d3e |
1 | package # hide from PAUSE |
2 | MyFilm; |
ea2e61bf |
3 | |
ea2e61bf |
4 | use base 'MyBase'; |
5 | use MyStarLink; |
6 | |
7 | use 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 | |
14 | sub _carp { } |
15 | |
16 | sub stars { map $_->star, shift->_stars } |
17 | |
18 | sub create_sql { |
19 | return qq{ |
20 | filmid TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY, |
21 | title VARCHAR(255) |
22 | }; |
23 | } |
24 | |
25 | 1; |
26 | |