Re: Class::DBI::Relationship::IsA now on CPAN
[prev]
[thread]
[next]
[Date index for 2004/09/27]
On Mon, 27 Sep 2004, Ryan Gendron wrote:
> 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');
good idea, will add that to the docs (along with another fix from the
list).
>
> 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?
umm.. no I have yet to consider the best way to deal with it, I kind of
assumed people just wouldn't do that ;)
I am planning to start using method attributes so that you could specify
methods to be inherited (for example if they aren't generated by cdbi and
so otherwise wouldn't be inherited), or should over-ride or not over-ride
inherited methods or should be over-ridable or not.
> 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.
can you mail me (offlist) some examples of what you tried so can I play
around with them and maybe see a way to fix it nicely.
cheers,
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