Re: [CDBI] has_many - how to specify link columns ?
"Ryan Tate" <lists-UNebACArQA1Wk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
On 8/15/06, Michael Reece <[email protected]> wrote: > articles->has_many( prices => 'prive2articles' => 'artid' ); # third > argument is 'my key in foreign table' The third argument to has_many should not be needed, assuming price2articles class properly sets up has_a relationship with articles class, i.e.: $price2articles_class->has_a( artid => $article_class ); $article_class->has_many( prices => $price2articles_class ); By the way, why not just rename the "price2articles" table "prices?" Seems a lot simpler.