Freeside:1.7:Documentation:Developer/FS/m2m Common

From Freeside
Jump to: navigation, search

NAME

FS::m2m_Common - Mixin class for classes in a many-to-many relationship

SYNOPSIS

use FS::m2m_Common;

@ISA = qw( FS::m2m_Common FS::Record );

DESCRIPTION

FS::m2m_Common is intended as a mixin class for classes which have a many-to-many relationship with another table (via a linking table).

Note: It is currently assumed that the link table contains two fields named the same as the primary keys of ths base and target tables.

METHODS

process_m2m OPTION => VALUE, ...
Available options:
link_table (required) -
target_table (required) -
params (required) - hashref; keys are primary key values in target_table (values are boolean). For convenience, keys may optionally be prefixed with the name of the primary key, as in agentnum54 instead of 54, or passed as an arrayref of values.

BUGS

SEE ALSO

FS::Record