1 package # hide from PAUSE
\r
2 DBICTest::Schema::Collection;
\r
4 use base qw/DBIx::Class::Core/;
\r
6 __PACKAGE__->table('collection');
\r
7 __PACKAGE__->add_columns(
\r
9 data_type => 'integer',
\r
10 is_auto_increment => 1,
\r
13 data_type => 'varchar',
\r
17 __PACKAGE__->set_primary_key('collectionid');
\r
19 __PACKAGE__->has_many( collection_object => "DBICTest::Schema::CollectionObject",
\r
20 { "foreign.collection" => "self.collectionid" }
\r
22 __PACKAGE__->many_to_many( objects => collection_object => "object" );
\r
23 __PACKAGE__->many_to_many( pointy_objects => collection_object => "object",
\r
24 { where => { "type" => "pointy" } }
\r
26 __PACKAGE__->many_to_many( round_objects => collection_object => "object",
\r
27 { where => { "type" => "round" } }
\r