Re: CDBI::Relationship::Glue ?

[prev] [thread] [next] [Date index for 2004/06/22]

From: Tony Bowden
Subject: Re: CDBI::Relationship::Glue ?
Date: 20:59 on 22 Jun 2004
On Mon, Jun 21, 2004 at 11:45:01PM +0300, Yuval Kogman wrote:
> 	Role->connect( actor => 'Actor', film 'Film');
> could be a nice way to shortcut. It would take the two foreign keys,
> generate plurals, create has_many relationships for films in Actor, and
> actors in Film, as well as has_many relationships for a role having an
> actor and a film.

Looks nice. As you suggest later I suspect "link" might be a better
name, as this sort of thing is usually known as a "linking table".

And I think it would be better as "links" describing what it's _doing_:
"this class links these two other classes"

Although, bear in mind that whatever you choose to call the method will
prevent anyone using your module from ever having a column called
that... so it should probably be something slightly more longwinded:
links_together? provides_link? is_linking?

> Is there anything foul with it? If not maybe someone (maybe even me)
> should make a little add-on module.

Go for it!

Tony

(message missing)

CDBI::Relationship::Glue ?
Yuval Kogman 20:45 on 21 Jun 2004

Re: CDBI::Relationship::Glue ?
Tony Bowden 20:59 on 22 Jun 2004

Re: CDBI::Relationship::Glue ?
Yuval Kogman 22:59 on 21 Jun 2004

Re: CDBI::Relationship::Glue ?
Yuval Kogman 17:49 on 22 Jun 2004

Re: CDBI::Relationship::Glue ?
Yuval Kogman 19:45 on 22 Jun 2004

Re: CDBI::Relationship::Glue ?
Tony Bowden 20:02 on 23 Jun 2004

Re: CDBI::Relationship::Glue ?
Yuval Kogman 20:11 on 22 Jun 2004

Re: CDBI::Relationship::Glue ?
Tony Bowden 20:57 on 23 Jun 2004

Re: CDBI::Relationship::Glue ?
Yuval Kogman 23:19 on 22 Jun 2004

Re: CDBI::Relationship::Glue ?
Tony Bowden 07:16 on 24 Jun 2004

Re: CDBI::Relationship::Glue ?
Yuval Kogman 08:16 on 23 Jun 2004

RE: CDBI::Relationship::Glue ?
Addison, Mark 14:54 on 23 Jun 2004

Re: CDBI::Relationship::Glue ?
Tony Bowden 15:24 on 23 Jun 2004

RE: CDBI::Relationship::Glue ?
Addison, Mark 15:52 on 23 Jun 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52