[Dbix-class] RecursiveUpdate and many to many
Zbigniew Lukasiak
zzbbyy at gmail.com
Sat Sep 27 08:54:44 BST 2008
Hi Matt,
I would like to include your critisizm of the support for many to many
in RecursiveUpdate in it's documentation. Tell me if I get it right.
What I remember is two points:
1. That I rely on the fact that
if($object->can($name) and
!$object->result_source->has_relationship($name) and
$object->can( 'set_' . $name )
)
then $name must be a many to many pseudo relation. And that in a
similarly ugly was I find out what is the ResultSource of objects from
that many to many pseudo relation.
2. That I treat uniformly relations and many to many (which are
different from relations because they require traversal of the bridge
table).
Is that right?
You had also a point about me using subroutines instead of methods -
but as I understand this is separated from the many to many issue.
Cheers,
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/
More information about the DBIx-Class
mailing list