line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::DBIx::Class::Example::Schema::Result::CD::Artist; { |
2
|
15
|
|
|
15
|
|
7131
|
use base 'Test::DBIx::Class::Example::Schema::Result'; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
2019
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
__PACKAGE__->table('cd_artist'); |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
__PACKAGE__->add_columns( |
7
|
|
|
|
|
|
|
fk_artist_id => { |
8
|
|
|
|
|
|
|
data_type => 'varchar', |
9
|
|
|
|
|
|
|
size => '36', |
10
|
|
|
|
|
|
|
is_nullable => 0, |
11
|
|
|
|
|
|
|
}, |
12
|
|
|
|
|
|
|
fk_cd_id => { |
13
|
|
|
|
|
|
|
data_type => 'varchar', |
14
|
|
|
|
|
|
|
size => '36', |
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('fk_artist_id','fk_cd_id'); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__PACKAGE__->belongs_to( |
27
|
|
|
|
|
|
|
cd => 'Test::DBIx::Class::Example::Schema::Result::CD', |
28
|
|
|
|
|
|
|
{ 'foreign.cd_id' => 'self.fk_cd_id'}, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__PACKAGE__->belongs_to( |
32
|
|
|
|
|
|
|
person_artist => 'Test::DBIx::Class::Example::Schema::Result::Person::Artist', |
33
|
|
|
|
|
|
|
{ 'foreign.artist_id' => 'self.fk_artist_id'}, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
} 1 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Test::DBIx::Class::Example::Schema::Result::CD::Artist - Artist Role |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 DESCRIPTION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Some CDs are artists. Each Artist works contributes to one or more CDs. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SEE ALSO |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
The following modules or resources may be of interest. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
L<DBIx::Class> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 AUTHOR |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
John Napiorkowski C<< <jjnapiork@cpan.org> >> |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Copyright 2009, John Napiorkowski C<< <jjnapiork@cpan.org> >> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
62
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |