Re: [CDBI] Re: has_a relationship with non-primary column?
"Perrin Harkins" <[email protected]> Fri, 7 Sep 2007 22:12:27 -0400
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
On 9/7/07, Edward J. Sabol <sabol-2oVx0MVsMgiP/[email protected]> wrote: > If I'm correctly understanding what the original poster is asking, then I've > run into this more often than I would like as well. might_have() can sort of > do this, right? It's not really the same thing. The might_have relationship means that the other class stores a foreign key back to this class, just like has_many. The has_a relationship means this class stores a foreign key to the other. If you want a custom relationship to do this, I suspect you could make it just by copying HasA and hacking it a little. - Perrin