Hi list,<br>
<br>
I tried the "Many-to-many relationships" example from the cookbok. It
works fine but I can't figure out how to name the belongs_to relation
other than the name of the column. That is:<br>
<br>
__PACKAGE__->belongs_to('authID' => 'MyApp::DBIC::Author');<br>
<br>
If I want to access the author by doing $obj->author, rather than $obj->authID. I've tried:<br>
__PACKAGE__->belongs_to ('author' => 'MyApp::DBIC::Author',
undef, 'authID');# (have also tried with {'foreign.authID' =>
'self.authID'})<br>
<br>
But that just gives me a complaint saying there is no author method in
MyApp::DBIC::Book2Author. This confuses me as there is no problem
naming has_many relations. Is it not possible or do I call the
belongs_to method completely wrong?<br><span>
<br>
/Jon</span>