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: 01:38 on 11 Jan 2005
On Mon, 10 Jan 2005 23:12:13 +0000, Tony Bowden <tony-cdbitalk@xxxxx.xxx> wrote:
> Although I'm intrigued by the idea of setting this up per search. I was
> expecting it to be another compile time option somehow. A more advanced
> version of has_many...
> 
> I guess the definitive version of this is Stars, Roles, and Films:
> 
> Star->has_many(roles => Role)
> Film->has_many(stars => Star)
> Role->has_a(film => Film)
> Role->has_a(star => Star)
> 
> Star->??? ; # gives us 'films' method
> Film->??? ; # gives us 'roles' method
> 
> We want something that will allow us to run searches like:
> 
> $star->films(film.year => 1982);
> 
> $sean->films(role.name => "James Bond");

That looks like it really only covers many to many relationships. 
What about joining a fourth table in there, or joining a table back to
itself?  Is that too ambitious?

I was hoping for something more flexible, not just another
Relationship.  We already know what the relationships are.  What is
missing is the ability to take an arbitrary number of those
relationships and use them in a single query, without needing to write
a custom function (I'm thinking of the Join examples in the Wiki
here).

        -- 
        Cees Hek

(message missing)

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

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