Fey::Meta::Role::Relationship::HasMany - A role for has-many metaclasses
version 0.45
This role provides shared functionality for the two has-many metaclasses, Fey::Meta::HasMany::ViaFK and Fey::Meta::HasMany::ViaSelect.
This role adds the following constructor options:
is_cached
Defaults to false for this class.
iterator_class
This is the class used for iterators over the objects in this relationship. By default, if this relationship is cached, it uses Fey::Object::Iterator::FromSelect::Caching, otherwise it uses Fey::Object::Iterator::FromSelect
This role provides the following methods:
Corresponds to the value passed to the constructor.
Corresponds to the value passed to the constructor, or the calculated default.
This method takes a Fey::Meta::Class::Table object and attaches the relationship to the associated class. Doing so will create a new method in the associated class.
The class associated with this object. This is undefined until $hm->attach_to_class() is called.
$hm->attach_to_class()
Returns the method associated with this object, if any.
If this object was attached to a class, it removes the method it made, and unsets the associated_class.
associated_class
Dave Rolsky <autarch@urth.org>
This software is copyright (c) 2011 by Dave Rolsky.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Fey::ORM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fey::ORM
CPAN shell
perl -MCPAN -e shell install Fey::ORM
For more information on module installation, please visit the detailed CPAN module installation guide.