Re: How do you get the class of has_a column?

[prev] [thread] [next] [Date index for 2004/10/27]

From: Yuval Kogman
Subject: Re: How do you get the class of has_a column?
Date: 07:51 on 27 Oct 2004
--gj572EiMnwbLXET9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 26, 2004 at 12:40:01 -0700, Peter Speltz wrote:
> If you a Person has a address:=20
> Person->has_a("address"=3D> "Address");
>=20
> Is there public  method to get the class of address such as
>=20
> Person->address->class_name.

IIRC should be something like.

Person->meta_info("has_a")->{"address"}->foreign_class

Look at the implementations of Class::DBI::Relationship and it's
subclasses, and also read the output of Data::Dumper on
Person->meta_info if I was wrong.

Ciao!

--=20
 ()  Yuval Kogman <nothingmuch@xxxxxxxx.xxx> 0xEBD27418  perl hacker &
 /\  kung foo master: /me does not drink tibetian laxative tea: neeyah!


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBf1OQVCwRwOvSdBgRAtfAAJ9+b0FAKLLDh6UGxFEqvi7bMlpO4ACcCB2L
pxIFVdrbUxab63qkdflIJKI=
=KGyf
-----END PGP SIGNATURE-----

--gj572EiMnwbLXET9--

How do you get the class of has_a column?
Peter Speltz 19:40 on 26 Oct 2004

Re: How do you get the class of has_a column?
Yuval Kogman 07:51 on 27 Oct 2004

Re: How do you get the class of has_a column?
Tony Bowden 08:28 on 27 Oct 2004

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