[Solar-talk] Collection Oddity
Paul M Jones
pmjones at solarphp.com
Wed Jan 30 08:46:49 CST 2008
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
More information about the Solar-talk
mailing list