|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
(Yet Another) DBIx::Class Joins questionby locked_user sundialsvc4 (Abbot) |
| on Jan 28, 2009 at 20:04 UTC ( [id://739689]=perlquestion: print w/replies, xml ) | Need Help?? |
|
locked_user sundialsvc4 has asked for the wisdom of the Perl Monks concerning the following question: I have (courtesy of DBIx::Class::Loader a schema which describes (correctly) the following database structure:
In other words, in TSeminar.pm I see: and in TProgram.pm:
A simple two-way join that considers only the leftmost three tables works:
Now, I want to apply the example from DBIx::Class::Manual::Joining: Or combine the two:
I cannot, for the life of me, make it work! Here's what I am trying: join => [ 'marketcode', {'programcode'=>'progfee'} ] and at runtime I get this error: Can't locate object method "progfee" via package "FOO::Schema::Scheme::TSeminar" I emphasized the two words because it seems to me that it's looking for progfee, which (I am trying to tell it...) is accessed from TProgram not TSeminar. I think that I am following the cookbook example rather strenuously, although I am fighting the fact that ... :-< ... the POD author resorted to “trying to be funny” instead of trying to be clear. Instead of sticking to the actual example he had previously been using in the document, he wandered off into the land of the completely irrelevant. I piece-together from his example that he is searching for a (single...) related room from whence you can find a chair and a table that has legs. Well... I'm trying to create the case where the base-table of the query is room.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||