File Coverage

blib/lib/Test/DBIx/Class/Example/Schema/Result/CD.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Test::DBIx::Class::Example::Schema::Result::CD; {
2 15     15   17909 use base 'Test::DBIx::Class::Example::Schema::Result';
  15         77  
  15         2654  
3              
4             __PACKAGE__->table('cd');
5              
6             __PACKAGE__->add_columns(
7             cd_id => {
8             data_type => 'varchar',
9             size => '36',
10             is_nullable => 0,
11             },
12             name => {
13             data_type => 'varchar',
14             size => '24',
15             is_nullable => 0,
16             },
17             created => {
18             data_type => 'timestamp',
19             set_on_create => 1,
20             is_nullable => 0,
21             },
22             );
23              
24             __PACKAGE__->set_primary_key('cd_id');
25             __PACKAGE__->uuid_columns('cd_id');
26              
27             __PACKAGE__->has_many(
28             cd_artist_rs => 'Test::DBIx::Class::Example::Schema::Result::CD::Artist',
29             { 'foreign.fk_cd_id' => 'self.cd_id'}
30             );
31              
32             __PACKAGE__->has_many(
33             track_rs => 'Test::DBIx::Class::Example::Schema::Result::CD::Track',
34             { 'foreign.fk_cd_id' => 'self.cd_id'},
35             { 'order_by' => {-asc=>'me.position'} },
36             );
37              
38             __PACKAGE__->many_to_many(
39             artists => 'cd_artist_rs', 'person_artist',
40             );
41              
42             } 1
43              
44             __END__
45              
46             =head1 NAME
47              
48             Test::DBIx::Class::Example::Schema::Result::CD - A cd
49              
50             =head1 DESCRIPTION
51              
52             A cd has tracks and has artists
53              
54             =head1 SEE ALSO
55              
56             The following modules or resources may be of interest.
57              
58             L<DBIx::Class>
59              
60             =head1 AUTHOR
61              
62             John Napiorkowski C<< <jjnapiork@cpan.org> >>
63              
64             =head1 COPYRIGHT & LICENSE
65              
66             Copyright 2009, John Napiorkowski C<< <jjnapiork@cpan.org> >>
67              
68             This program is free software; you can redistribute it and/or modify
69             it under the same terms as Perl itself.
70              
71             =cut