% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::m2m_Common - Mixin class for classes in a many-to-many relationship
use FS::m2m_Common;
@ISA = qw( FS::m2m_Common FS::Record );
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).
It is currently assumed that the link table contains two fields named the same as the primary keys of the base and target tables, but you can ovverride this assumption if your table is different.
Available options:
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.
base field, defaults to primary key of this base table
target field, defaults to the primary key of the target table
static hashref further qualifying the m2m fields
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head1'