Trailing WS crusade - got to save them bits
[dbsrgits/DBIx-Class.git] / t / cdbi / testlib / MyStarLinkMCPK.pm
CommitLineData
8273e845 1package # hide from PAUSE
c6d74d3e 2 MyStarLinkMCPK;
ea2e61bf 3
ea2e61bf 4use base 'MyBase';
5
6use MyStar;
7use MyFilm;
8
9use strict;
10
11# This is a many-to-many mapping table that uses the two foreign keys
12# as its own primary key - there's no extra 'auto-inc' column here
13
14__PACKAGE__->set_table();
15__PACKAGE__->columns(Primary => qw/film star/);
16__PACKAGE__->columns(All => qw/film star/);
17__PACKAGE__->has_a(film => 'MyFilm');
18__PACKAGE__->has_a(star => 'MyStar');
19
20sub create_sql {
6a3bf251 21 return qq{
ea2e61bf 22 film INTEGER NOT NULL,
23 star INTEGER NOT NULL,
24 PRIMARY KEY (film, star)
25 };
26}
27
281;
29