The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

NAME

Mandel::Relationship::HasOne - A field relates to another mongodb document

DESCRIPTION

Example:

MyModel::Cat
->description
->add_relationship(has_one => owners => '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);
$person = MyModel::Cat->new->owner;
$self = MyModel::Cat->new->owner(sub { my($self, $err, $person) = @_; });

METHODS

create

$clsas->create($target => $field_name => 'Other::Document::Class');

SEE ALSO

Mojolicious, Mango, Mandel::Relationship

AUTHOR

Jan Henning Thorsen - jhthorsen@cpan.org