ObjectDB::Relationship::OneToOne - one to one relationship for ObjectDB
package Author; use strict; use warnings; use base 'ObjectDB'; __PACKAGE__->schema( table => 'author', columns => [qw/id name password/], primary_keys => ['id'], auto_increment => 'id', unique_keys => 'name', relationships => { author_admin => { type => 'one to one', class => 'AuthorAdmin', map => {id => 'author_id'} } } ); 1;
One to one relationship for ObjectDB.
Inherits everything from ObjectDB::Relationship::ManyToOne.
Viacheslav Tykhanovskyi, vti@cpan.org.
vti@cpan.org
Copyright (C) 2009, Viacheslav Tykhanovskyi.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10.
To install ObjectDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ObjectDB
CPAN shell
perl -MCPAN -e shell install ObjectDB
For more information on module installation, please visit the detailed CPAN module installation guide.