The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Fey::Meta::HasMany::ViaSelect - A parent for has-one metaclasses based on a query object

VERSION

version 0.46

DESCRIPTION

This class implements a has-one relationship for a class, based on a provided (or deduced) query object.

CONSTRUCTOR OPTIONS

This class accepts the following constructor options:

  • select

    An object which does the Fey::Role::SQL::ReturnsData role. This query defines the relationship between the tables.

  • bind_params

    An optional subroutine reference which will be called when the SQL is executed. It is called as a method on the object of this object's associated class.

  • allows_undef

    This defaults to true.

METHODS

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

$ho->select()

Corresponds to the value passed to the constructor.

$ho->bind_params()

Corresponds to the value passed to the constructor.

AUTHOR

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

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.