Re: What relationships does a class have?

[prev] [thread] [next] [Date index for 2005/03/15]

From: William Ross
Subject: Re: What relationships does a class have?
Date: 15:20 on 15 Mar 2005
On 15 Mar 2005, at 14:52, Sean Davis wrote:

> I am using CDBI::Loader on a rather large schema and wondered if there 
> is a way to get the relationships (or even methods) that a class has?  
> I imagine there is, but I haven't found it.

$hash_of_everything = $class->meta_info;

or

$hash_of_relationships = $class->meta_info('has_a');
$hash_of_relationships = $class->meta_info('has_many');

It's not documented yet, but see 
http://www.class-dbi.com/cgi-bin/wiki/index.cgi?CdbiWishList for a 
provisional description. I don't know whether this functionality is 
officially reliable, but it works very nicely at the moment.

best

will

What relationships does a class have?
Sean Davis 14:52 on 15 Mar 2005

Re: What relationships does a class have?
.--- .- -- . ... 15:15 on 15 Mar 2005

Re: What relationships does a class have?
Sebastian Riedel 17:41 on 15 Mar 2005

Re: What relationships does a class have?
Sean Davis 17:50 on 15 Mar 2005

Re: What relationships does a class have?
Kingsley Kerce 15:15 on 15 Mar 2005

Re: What relationships does a class have?
William Ross 15:20 on 15 Mar 2005

Generated at 15:09 on 27 Mar 2005 by mariachi v0.52