[Solar-talk] Collection Oddity

Kilbride, James P. James.Kilbride at gd-ais.com
Wed Jan 30 09:00:33 CST 2008


Found the problem.

It's the bloody capitalization issue again. $this->_data shows the key
as being 'user_prog_id' while the table description and the table col
definition has 'User_Prog_ID'. So _data has been lowercased but none of
the column names have been. I haven't traced things back enough yet to
identify where _data is coming from that the column is lowercased. But I
will.

James Kilbride 

-----Original Message-----
From: solar-talk-bounces at lists.solarphp.com
[mailto:solar-talk-bounces at lists.solarphp.com] On Behalf Of Kilbride,
James P.
Sent: Wednesday, January 30, 2008 9:56 AM
To: solar-talk at lists.solarphp.com
Subject: RE: [Solar-talk] Collection Oddity

PRI should be right. I'm using Mysql 5.0.45. And I just ran a few
print_r's on the mysql adaptor and it's getting the columns correctly
and setting the primary key to true on the $descr fields. So now I"m
really rather confused.

James Kilbride 

-----Original Message-----
From: solar-talk-bounces at lists.solarphp.com
[mailto:solar-talk-bounces at lists.solarphp.com] On Behalf Of Paul M Jones
Sent: Wednesday, January 30, 2008 9:47 AM
To: solar-talk at lists.solarphp.com
Subject: Re: [Solar-talk] Collection Oddity


On Jan 30, 2008, at 06:29 , Kilbride, James P. wrote:

> So, one of my developers looked into this a little more. If we specify

> the primary key after the table is created or specify it not with the 
> column name solar gives us that error. IF you set the primary key on 
> the column during the initial table creation on the same line as the 
> column solar gets it fine. Any ideas on whether mysql describes the 
> table differently based on when the primary key is defined? I noticed 
> that the key, when you run desc table shows up as PRI instead of P, if

> that makes a difference.

Aha -- it does make a difference.  Take a look in
Solar_Sql_Adapter_Mysql::_fetchTableCols().  You will see that it looks
for "$val['key'] == 'PRI'" to determine if a column is (or is part of)
the primary key.

What MySQL version are you using there?

I would be very interested to see the two different describe-table
outputs: the one when you primary-key at creation time, and the one when
you set it afterwards.



-- pmj
_______________________________________________
Solar-talk mailing list
Solar-talk at lists.solarphp.com
http://mailman-mail3.webfaction.com/listinfo/solar-talk

_______________________________________________
Solar-talk mailing list
Solar-talk at lists.solarphp.com
http://mailman-mail3.webfaction.com/listinfo/solar-talk



More information about the Solar-talk mailing list