CDBI::Relationship::Glue ?

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

From: Yuval Kogman
Subject: CDBI::Relationship::Glue ?
Date: 20:45 on 21 Jun 2004
--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

In light of some recent discussions, I propose the addition of a
cosmetic relationship - a connection.

Lets take the actor/film/role example.

	Role->connect( actor =3D> '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.

Perhaps a keyword like "link" would be better, because it avoids the
associations with 'connection', which has to do with the database
handle.

I browsed search.cpan.org and did not find anything like this.

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

It could also make a nice idiom for Simon Cozen's
Class::DBI::Loader::Relationship:

	"a role connects films to actors";
	"a handpump oozes beer in pubs";
	"handpumps supply beers at pubs";

or whatever.

--=20
 ()  Yuval Kogman <nothingmuch@xxxxxxxx.xxx> 0xEBD27418  perl hacker &
 /\  kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!


--YiEDa0DAkWCtVeE4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFA10jNVCwRwOvSdBgRAhUJAJ9w3nJEWLHkS2sIL08o+N/GaUroQwCggfxB
FwX2dCqx/ZC3IRZKnHklHmM=
=Lg/V
-----END PGP SIGNATURE-----

--YiEDa0DAkWCtVeE4--

(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