NAME
Mandel::Relationship::BelongsTo - A document is owned by another mongodb document
DESCRIPTION
Example:
MyModel::Cat
->description
->relationship(belongs_to => owner => 'MyModel::Person');
Will add:
$cat = MyModel::Cat->new->owner(\%args, $cb);
$cat = MyModel::Cat->new->owner($person_obj, $cb);
$person_obj = MyModel::Cat->new->owner(\%args);
$person_obj = MyModel::Cat->new->owner($person_obj);
$cat = MyModel::Cat->new->owner($bson_oid);
$person = MyModel::Cat->new->owner;
$self = MyModel::Cat->new->owner(sub { my($self, $err, $person) = @_; });
ATTRIBUTES
foreign_field
The name of the field in this class which hold the "_id" to the related doc.
METHODS
monkey_patch
Add methods to "document_class" in Mandel::Relationship.
SEE ALSO
Mojolicious, Mango, Mandel::Relationship
AUTHOR
Jan Henning Thorsen - jhthorsen@cpan.org