Dave Rolsky > Fey-ORM-0.26 > Fey::Meta::HasMany

Download:
Fey-ORM-0.26.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs

Source   Latest Release: Fey-ORM-0.30

NAME ^

Fey::Meta::HasMany - A parent for has-many metaclasses

DESCRIPTION ^

This class exists to provide a common parent for the two has-many metaclasses, Fey::Meta::HasMany::ViaFK and Fey::Meta::HasMany::ViaSelect.

CONSTRUCTOR OPTIONS ^

This class accepts the following constructor options:

METHODS ^

This provides the following methods:

$hm->name()

Corresponds to the value passed to the constructor.

$hm->table()

Corresponds to the value passed to the constructor.

$hm->foreign_table()

Corresponds to the value passed to the constructor.

$ho->is_cached()

Corresponds to the value passed to the constructor, or the calculated default.

$hm->iterator_class()

Corresponds to the value passed to the constructor, or the calculated default.

$hm->attach_to_class($class)

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.

$hm->associated_class()

The class associated with this object. This is undefined until $hm->attach_to_class() is called.

$hm->associated_method()

Returns the method associated with this object, if any.

$hm->detach_from_class()

If this object was attached to a class, it removes the method it made, and unsets the associated_class.

AUTHOR ^

Dave Rolsky, <autarch@urth.org>

BUGS ^

See Fey::ORM for details.

COPYRIGHT & LICENSE ^

Copyright 2006-2009 Dave Rolsky, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module.