Re: CDR::IsA and *has_many* relationships in the parent class

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

From: Peter Speltz
Subject: Re: CDR::IsA and *has_many* relationships in the parent class
Date: 04:22 on 20 Mar 2005
--- Rhesa Rozendaal <perl@xxxxx.xxx> wrote:
> 
> Rhesa Rozendaal wrote:

> It seems I need to narrow down this assertion: has_a relationships are
> handled quite well; it's only the has_many relationships that are not
> taken into account, as far as I can see. I haven't investigated any of the
> other relationship types, so this question really is only about
> how to integrate has_many relations from the parent class into the child
> class.
> 

Did you try "inheriting" the has_many accessor by including in the sub class's
all columns list?  Not sure if that will work as its not really a column. Not
sure this is a good hack either cause it could get confusing. 

Base::Class->has_many(things => Thing::Class);
...
Sub::Class->is_a(fk => Base::Class);
Sub::Class->columns(All => qw/.. .. things/);



pjs


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

(message missing)

Re: CDR::IsA and *has_many* relationships in the parent class
Peter Speltz 04:22 on 20 Mar 2005

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