| Test-DBIx-Class documentation | Contained in the Test-DBIx-Class distribution. |
Test::DBIx::Class::Example::Schema::Result::Phone - The base result class
TBD
Sample result class for testing and for other component authors
The following modules or resources may be of interest.
John Napiorkowski <jjnapiork@cpan.org>
Copyright 2009, John Napiorkowski <jjnapiork@cpan.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Test-DBIx-Class documentation | Contained in the Test-DBIx-Class distribution. |
package Test::DBIx::Class::Example::Schema::Result::Phone; { use base 'Test::DBIx::Class::Example::Schema::Result'; __PACKAGE__->table('phone'); __PACKAGE__->add_columns( fk_person_id => { data_type => 'varchar', size => '36', is_nullable => 0, }, number => { data_type => 'varchar', size => '10', is_nullable => 0, }, ); __PACKAGE__->set_primary_key('fk_person_id','number'); __PACKAGE__->belongs_to( owner => 'Test::DBIx::Class::Example::Schema::Result::Person', { 'foreign.person_id' => 'self.fk_person_id' }, ); } 1 __END__