Вячеслав Тихановский > ObjectDB-0.990103 > ObjectDB::Relationship::OneToOne

Download:
ObjectDB-0.990103.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

ObjectDB::Relationship::OneToOne - one to one relationship for ObjectDB

SYNOPSIS ^

    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;

DESCRIPTION ^

One to one relationship for ObjectDB.

ATTRIBUTES ^

Inherits everything from ObjectDB::Relationship::ManyToOne.

METHODS ^

Inherits everything from ObjectDB::Relationship::ManyToOne.

AUTHOR ^

Viacheslav Tykhanovskyi, vti@cpan.org.

COPYRIGHT ^

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.

syntax highlighting: