Re: [CDBI] add_column - bug or feature?

[prev] [thread] [next] [Date index for 2006/01/09]

From: Peter Speltz
Subject: Re: [CDBI] add_column - bug or feature?
Date: 20:08 on 09 Jan 2006
Opps I forgot I have a personal hack in the file I attached so that
the child class always gets its PK set  to the parent's PK . This is
because currently you cannot  setup IsA on a PK. Any ideas on a nice
interface to allow this option would be appreciated. I'm thinking an
extra argument when you set up the relationship -- "1:1" or "1:M" may
prove useful. If IsA  knows that it is a one to one, for example,  it=20
could always set the PKs the same in parent and child and cascade
delete  the parent

Beer->is_a(drink_id =3D> "Adult::Beverage", '1:11' one_to_one'

 .
Anyway look for the lines

# pjs -- want pks same for isa #############################
    $self->_attribute_store($self->primary_column =3D> $f_obj->id);
############################################################

and comment out.

cheers


On 1/9/06, Peter Speltz <peterspeltz@xxxxx.xxx> wrote:
> On 1/9/06, Kate Yoak <kate@xxxxxxxxx.xxx> wrote:
> >
>
> > $class->__grouper->add_group(TEMP =3D> $accessor);
> > I swiped this from Relationship::IsA whose code hasn't change as far as=
 I
> > can tell - and it probably fails too.
> >
>
> I thought this was  strange too. Not sure whether this is a bug of
> feature. I think is is preparation for the future versions where
> column objects will be powerful tools (if I understand the direction
> CDBI is heading correctly)  I have just  taken over IsA and have a
> patched version  I have been using on CDBI 3.12.  I am about to take
> all the debugging statements out or  make them optional is probably
> more like it because I'm sure i will need them sometime.  Attached is
> the patched version and let me know if it does not work for 3.13 .
> Also email me if you want an IsA version without the debugging
> statements. It may be a week before I have it on an SVN server .
>
>
> > Cheers,
> > Kate
> > _______________________________________________
> > ClassDBI mailing list
> > ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
> > http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
> >
> >
> >
>
>
> --
> pjs
>
>
>


--
pjs

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] add_column - bug or feature?
Kate Yoak 09:15 on 09 Jan 2006

Re: [CDBI] add_column - bug or feature?
Peter Speltz 18:42 on 09 Jan 2006

Re: [CDBI] add_column - bug or feature?
Peter Speltz 20:08 on 09 Jan 2006

Re: [CDBI] add_column - bug or feature?
Peter Speltz 20:12 on 09 Jan 2006

Generated at 09:31 on 23 Jan 2006 by mariachi v0.52