Hi DBIC experts, Maybe a dumb question, maybe I'm doing it wrong, but I don't seem to be able to chain two many-to-many relations.
I'm re-writing (OO style) a RBAC system, where a user is part of a group, and each group has access to a set of applications : user ----many-to-many---- group ----many-to-many----- application I'd like to use a shortcut of the form : my $rsApplications=$rowUser->groups->applications But it does not seem to work. I get this error : Can't locate object method "applications" via package "DBIx::Class::ResultSet" Addressing the two many-to-many relationships independently works correctly. Is it at all possible to chain many-to-many relationships ? DBIx::Class::Relationship doc has some hint about that "you cannot call related_resultset and similar methods", so I suspect the answer is negative. But I could be wrong. Another option would be to create a many-to-many relationship that spawns all five tables ? Any hint welcome. Thanks in advance, Jean-François "Jef" Stenuit _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
