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

Peter Speltz peterspeltz@yahoo.com
Wed, 2 Feb 2005 12:38:46 -0800 (PST)


--- Dana Hudes <dhudes@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