Re: Multi Multi problems (was a null subject)
[prev]
[thread]
[next]
[Date index for 2005/04/28]
On Thu, Apr 28, 2005 at 12:06:35PM -0500, Jonathan Steinert wrote:
> I tried doing it originally as a single object pointing both ways, but
> as a multi column primary key I have no way of controlling which column
> the has_many() lookup from the node uses as the lookup key. Basically
> what was happening was the lookup would work properly in one direction,
> but then it would lookup according to the same column the next time and
> return the other column. In other words I would get the same result set
> for both a 'parents' and 'children' call, but it would return the
> corresponding columns, making it look as if the current node has the
> same number of parents as children and all of the parents as itself.
Maybe you could hack something that works for you out of the HasManyToMany
relationship module I have available on http://trout.me.uk/perl/
It's far from perfect and woefully undocumented (hence not being good enough
to CPAN) but might serve as a useful starting point.
Note to the rest of the list: if anybody wants to give me a hand turning this
into something CPAN-able I'd be happy to have the help.
--
Matt S Trout Brag sheet: http://trout.me.uk/services.html
LAMP, Infrastructure Contact: services@xxxxx.xx.xx
and Automation
specialist Do it once. Do it right.
|
Jonathan Steinert 09:21 on 28 Apr 2005
|
|
|
Re:
Jay Strauss 13:26 on 28 Apr 2005
|