Re: Vague thoughts about is_a and might_be relationships

[prev] [thread] [next] [Date index for 2004/08/23]

From: James O'Sullivan
Subject: Re: Vague thoughts about is_a and might_be relationships
Date: 15:58 on 23 Aug 2004
On Thu, 19 Aug 2004, Aaron Trevena wrote:

<snip>
>
> I have a very short Class::DBI::Relationship::IsA module that Richard
> Hundt wrote but isn't on CPAN. It seems to work when he used it but I
> haven't used it in anger yet. It is attached, but I haven't tested (or
> even compiled it). usual disclaimers and caveats apply :)

This module looks promising.  I was actually in the middle of writing
something very similar for my current project, but I've now ditched it as
this is far further along.

I had to make a few changes to get it to work the way I wanted for my
project:

1) I mapped the parent object's column methods to the child.
2) I added a trigger so that if $child->update is executed the parent is
also updated.

If you think this would be useful I can send a patch.  I'll probably make
a few more changes as the project progresses.

--
-James


Re: Vague thoughts about is_a and might_be relationships
James O'Sullivan 15:58 on 23 Aug 2004

is_a relationship?
Caroline Johnston 14:14 on 27 Aug 2004

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