Fey::Meta::HasMany::ViaFK(3)

NAME
Fey::Meta::HasMany::ViaFK - A parent for has-one metaclasses based on a Fey::FK object

VERSION
version 0.47

DESCRIPTION
This class implements a has-one relationship for a class, based on a provided (or deduced) Fey::FK object.

CONSTRUCTOR OPTIONS
This class accepts the following constructor options:

•   fk

    If you don't provide this, the class looks for foreign keys between "$self->table()" and and "$self->foreign_table()". If it finds exactly one, it uses that one.

•   order_by

    This will be appended to the SQL which is generated to select the foreign rows. It should be an arrayref which can be passed to "Fey::SQL::Select->order_by()".

•   allows_undef

    This defaults to true if any of the columns in the local table are NULLable, otherwise it defaults to false.

METHODS
Besides the methods provided by Fey::Meta::Role::Relationship::HasMany and Fey::Meta::Role::Relationship::ViaFK, this class also provides the following methods:

  $ho->fk()
Corresponds to the value passed to the constructor, or the calculated default.

  $ho->order_by()
Corresponds to the value passed to the constructor.

AUTHOR
Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE
This software is copyright (c) 2011 - 2015 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.