Preferences/Schema/Result/PrfOwner.pm

filter: Statementstmt 92.0% 23 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 90.3% 28 / 31 CC 1 SCAR 1.5
CC
1
Cov
92%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Preferences/Schema/ResultSet/PrfDefaultValues.pm ↑ Summary Preferences/Schema.pm »
1  
2 package OpusVL::Preferences::Schema::Result::PrfOwner;
3  
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use MooseX::NonMoose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 extends 'DBIx::Class::Core';
11  
12 1 __PACKAGE__->table("prf_owners");
13  
14 1 __PACKAGE__->add_columns
15 (
16 prf_owner_id =>
17 {
18 data_type => "integer",
19 is_nullable => 0
20 },
21  
22 prf_owner_type_id =>
23 {
24 data_type => "integer",
25 is_nullable => 0,
26 },
27 );
28  
29 1 __PACKAGE__->set_primary_key("prf_owner_id", "prf_owner_type_id");
30  
31  
32 1 __PACKAGE__->has_many
33 (
34 prf_preferences => "OpusVL::Preferences::Schema::Result::PrfPreference",
35 {
36 "foreign.prf_owner_id" => "self.prf_owner_id",
37 "foreign.prf_owner_type_id" => "self.prf_owner_type_id",
38 },
39 { join_type => 'left' }
40 );
41  
42 1 __PACKAGE__->belongs_to
43 (
44 prf_owner_types => 'OpusVL::Preferences::Schema::Result::PrfOwnerType',
45 {
46 'foreign.prf_owner_type_id' => 'self.prf_owner_type_id'
47 }
48 );
49  
50 __PACKAGE__->has_many
51 (
52 _by_name => 'OpusVL::Preferences::Schema::Result::PrfPreference',
53 sub {
54 0 ▶ my $args = shift;
Subroutine __ANON__: not called CC=1 SCAR=6.9
55 return (
56 {
57 0 "$args->{foreign_alias}.prf_owner_id" => { -ident => "$args->{self_alias}.prf_owner_id" },
58 "$args->{foreign_alias}.prf_owner_type_id" => { -ident => "$args->{self_alias}.prf_owner_type_id" },
59 "$args->{foreign_alias}.name" => \"= ?",
60 }
61 );
62 },
63 1 );
64  
65  
66 1 return 1;
67  
68 __END__
69  
70 =pod
71  
72 =encoding UTF-8
73  
74 =head1 NAME
75  
76 OpusVL::Preferences::Schema::Result::PrfOwner
77  
78 =head1 VERSION
79  
80 version 0.24
81  
82 =head1 DESCRIPTION
83  
84 =head1 METHODS
85  
86 =head1 ATTRIBUTES
87  
88 =head2 prf_preferences
89  
90 =head2 prf_owner_types
91  
92 =head2 prf_owner_id
93  
94 =head2 prf_owner_type_id
95  
96 =head1 LICENSE AND COPYRIGHT
97  
98 Copyright 2012 OpusVL.
99  
100 This software is licensed according to the "IP Assignment Schedule" provided with the development project.
101  
102 =head1 AUTHOR
103  
104 OpusVL - www.opusvl.com
105  
106 =head1 COPYRIGHT AND LICENSE
107  
108 This software is copyright (c) 2011 by OpusVL - www.opusvl.com.
109  
110 This is free software; you can redistribute it and/or modify it under
111 the same terms as the Perl 5 programming language system itself.
112  
113 =cut
« Preferences/Schema/ResultSet/PrfDefaultValues.pm ↑ Summary Preferences/Schema.pm »