1 package #hide from pause
2 DBICNGTest::Schema::Result::Gender;
5 extends 'DBICNGTest::Schema::Result';
10 DBICNGTest::Schema::Result::Gender; An example Gender Class;
14 Tests for this type of FK relationship
18 This class defines the following attributes.
22 example of using an attribute to add constraints on a table insert
26 has 'label' =>(is=>'rw', required=>1, isa=>'Str');
29 =head1 PACKAGE METHODS
31 This module defines the following package methods
35 Name of the Physical table in the database
45 Add columns and meta information
49 Primary Key which is an auto generated UUID
53 Text label of the gender (ie, 'male', 'female', 'transgender', etc.).
71 Sets the Primary keys for this table
76 ->set_primary_key(qw/gender_id/);
81 Marks the unique columns
86 ->add_unique_constraint('gender_label_unique' => [ qw/label/ ]);
91 A resultset of people with this gender
97 people => 'DBICNGTest::Schema::Result::Person',
98 {'foreign.fk_gender_id' => 'self.gender_id'}
104 This module defines the following methods.
108 See L<DBIx::Class> for more information regarding authors.
112 You may distribute this code under the same terms as Perl itself.