NAME

Mandel::Relationship::HasMany - A field relates to many other mongodb document

DESCRIPTION

Example:

MyModel::Cat
  ->description
  ->relationship(has_many => owners => 'MyModel::Person');

Will add:

$cat = MyModel::Cat->new->add_owners(\%args, $cb);
$cat = MyModel::Cat->new->add_owners($person_obj, $cb);

$person_obj = MyModel::Cat->new->add_owners(\%args);
$person_obj = MyModel::Cat->new->add_owners($person_obj);

$persons = MyModel::Cat->new->search_owners;

$person_objs = MyModel::Cat->new->owners;
$self = MyModel::Cat->new->owners(sub {
  my($self, $err, $person_objs) = @_;
});

ATTRIBUTES

add_method_name

The name of the method used to add another document to the .

search_method_name

The name of the method used to search related documents.

METHODS

monkey_patch

Add methods to "document_class" in Mandel::Relationship.

SEE ALSO

Mojolicious, Mango, Mandel::Relationship

AUTHOR

Jan Henning Thorsen - jhthorsen@cpan.org