Re: Feature request - Allow searching columns of related tables in search() and search_like()

[prev] [thread] [next] [Date index for 2005/01/11]

From: Cees Hek
Subject: Re: Feature request - Allow searching columns of related tables in search() and search_like()
Date: 13:15 on 11 Jan 2005
On Tue, 11 Jan 2005 09:17:56 +0000, Tony Bowden <tony-cdbitalk@xxxxx.xxx> wrote:
> On Tue, Jan 11, 2005 at 12:04:30AM -0500, Cees Hek wrote:
> > The attached patch to Class::DBI
> > adds classname support to the __ESSENTIAL__ call, namely allowing
> > __ESSENTIAL(Music::Track=track)__.
> 
> This shouldn't be needed. We don't want to have to specify that twice
> (never mind the problems if someone aliases two classes to the same
> name!)
> 
> We already have a substitution of __ESSENTIAL(track)__. Are you saying
> that's broken, or just that I screwed up the ManyMany call to that?

Music::Artist->manymany(tracks => ['Music::CD', 'Music::Track']);

From the above call ManyMany generated __ESSENTIAL(track)__  which was
turned into track.artistid.  where 'track' is the allias passed to
__ESSENTIAL__, and 'artistid' is pulled from $self->_essential, but
$self turned out not to be Music::Track, but Music::Artist.

So it looks like the manymany call set things up the way you wanted,
but when __ESSENTIAL__ was substituted it picked the wrong class to
pull the data from.

        -- 
        Cees Hek

(message missing)

Re: Feature request - Allow searching columns of related tables in search() and search_like()
Cees Hek 13:15 on 11 Jan 2005

Generated at 12:48 on 22 Feb 2005 by mariachi v0.52