Re: Class::DBI::Relationship::IsA now on CPAN

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

From: Ryan Gendron
Subject: Re: Class::DBI::Relationship::IsA now on CPAN
Date: 20:22 on 27 Sep 2004
Thank you for this Aaron.

It might be worth adding a line about modifying one's base class to include
the relationship, e.g.

__PACKAGE->add_relationship_type(is_a =>'Class::DBI::Relationship::IsA');


One problem I've had is that both my parent and child classes contain some
common columns, like mtime and ctime, thus i get these 'subroutine
redefined' messages.  Perhaps I missing something obvious here?  Anyway, I
thought I might be able to have IsA ignore these duplicate columns when
identifying the child's class methods from them, but these columns seem to
be mising from the all_columns group for some reason after the parent's
class columns are specified as TEMP (after looking into it, I suspect this
is related to these duplicate columns being marked as belonging to the TEMP
group and therefor not considered 'in the database' of columns all draws
from).  For the short term, I'm keeping the original all_column information
in the args hashref and using that...and things are working as expected in
my (limited) use so far.

Ryan



----- Original Message ----- 
From: "Aaron Trevena" <teejay@xxxxxx.xxx>
To: <cdbi-talk@xxxxxx.xxxxx.xxx>
Sent: Monday, September 27, 2004 9:02 AM
Subject: Class::DBI::Relationship::IsA now on CPAN


> hi all,
>
> You can now get 'Class::DBI::Relationship::IsA' from CPAN, see
> http://search.cpan.org/~teejay/Class-DBI-Relationship-IsA-0.02/
> for details.
>
> In short it provides an 'Is A' relationship, so that a child object can
> inherit its parents CDBI attributes and their accessors transparently to
> the user.
>
> It doesn't munge @ISA so methods in a module that aren't generated by
> CDBI, etc won't be inherited - you may want to mix-in instead, providing
> the persistance and accessors/mutators from one parent class and other
> methods/functionality from another class. I'm sure that it matches
> one of those puritan OO buzzwordy class patterns that Java people like so
> much ;)
>
> Patches, fixes and additional documentation welcome as always..
>
> A.
>
> -- 
> Aaron J Trevena - Perl Hacker, Kung Fu Geek, Internet Consultant
> AutoDia --- Automatic UML and HTML Specifications from Perl, C++
> and Any Datasource with a Handler.     http://droogs.org/autodia
>


Class::DBI::Relationship::IsA now on CPAN
Aaron Trevena 15:02 on 27 Sep 2004

Re: Class::DBI::Relationship::IsA now on CPAN
Dave Howorth 15:49 on 27 Sep 2004

Re: Class::DBI::Relationship::IsA now on CPAN
Aaron Trevena 16:10 on 27 Sep 2004

Re: Class::DBI::Relationship::IsA now on CPAN
Ryan Gendron 20:22 on 27 Sep 2004

Re: Class::DBI::Relationship::IsA now on CPAN
Aaron Trevena 21:59 on 27 Sep 2004

Re: Class::DBI::Relationship::IsA now on CPAN
Michael G Schwern 16:07 on 18 Oct 2004

Re: Class::DBI::Relationship::IsA now on CPAN
Aaron Trevena 11:30 on 22 Oct 2004

Re: Class::DBI::Relationship::IsA now on CPAN
Tony Bowden 11:55 on 22 Oct 2004

Re: Class::DBI::Relationship::IsA now on CPAN
Aaron Trevena 15:01 on 22 Oct 2004

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