Commit | Line | Data |
8273e845 |
1 | package # hide from PAUSE |
c6d74d3e |
2 | MyFilm; |
ea2e61bf |
3 | |
4a233f30 |
4 | use warnings; |
5 | use strict; |
6 | |
ea2e61bf |
7 | use base 'MyBase'; |
8 | use MyStarLink; |
9 | |
ea2e61bf |
10 | __PACKAGE__->set_table(); |
11 | __PACKAGE__->columns(All => qw/filmid title/); |
12 | __PACKAGE__->has_many(_stars => 'MyStarLink'); |
13 | __PACKAGE__->columns(Stringify => 'title'); |
14 | |
15 | sub _carp { } |
16 | |
17 | sub stars { map $_->star, shift->_stars } |
18 | |
19 | sub create_sql { |
6a3bf251 |
20 | return qq{ |
ea2e61bf |
21 | filmid TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY, |
22 | title VARCHAR(255) |
23 | }; |
24 | } |
25 | |
26 | 1; |
27 | |