|Keep It Simple, Stupid|
list DBIX::Class many_to_many relationsby misterb101 (Sexton)
|on Dec 18, 2010 at 14:10 UTC||Need Help??|
misterb101 has asked for the wisdom of the Perl Monks concerning the following question:
Hi fellow Perl hackers, I am working on a large application in which I use DBIX::Class as an ORM. I have a 'Document' resultset that is linked up to a large number of other resultsets using many_to_many relations. This allows me to define what documents are related to other database objects. Now I want to get a list of Documents, easy:
For every document that is returned I want to display to which other objects it is actually connected using a many_to_many relation without manually having to go through all the many_to_many relations the object has. This allows me to more easily expand the number of objects the 'Document' object is connected to without having to redefine the code above. Can anyone tell me if it is possible to list which many_to_many relations a resultset has and which relations actually have a connected object?
If anyone can help me I would be VERY gratefull