Re: [Maypole] Maypole::Plugin::Relationships and YAML

From: Peter Speltz (peterspeltz at yahoo.com)
Date: Wed Feb 02 2005 - 20:38:46 GMT


--- Dana Hudes <dhudes at hudes.org> wrote:

>
>
> On Wed, 2 Feb 2005, Sebastian Riedel wrote:
>
> > > Dana Hudes:
>
> > >As Tony points out, CDBI makes an alias called 'id' -- in CDBI, not SQL
> > > it doesn't touch your schema -- for your PK no matter what you call it.
> > > So long as Maypole doesn't go generating SQL on its own, relying instead
> > > on CDBI, this should not pose a conflict.
> >
> > It also uses column lists...
>
> OK but the column list in CDBI includes the alias of id for your PK, I
> mean that's the point of an alias isn't it?
> So is this or is this not, a priori, a problem?
>

If you mean the list generated by $class->columns() , i don't think it does.
CDBI makes an accessor called "id" which if you say $class->id returns the
equivalent of $class->primary_column. But if your PK is not named "id" in your
table i don't think the "columns()" list will have 'id' in it and i bet if you
say $class->get('id') you won't get anything. I've never checked any of this
and i could be misunderstanding.

=====
pjs

                
__________________________________
Do you Yahoo!?
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:58 GMT