Bill Karwin wrote:
>
>
>
> spaceage wrote:
>>
>> awesome...so when using MySQL, Zend_Db_Table_Abstract will auto discover
>> the primary key without declaring the $_primary property in the
>> overriding class?
>>
>
> Right. During the constructor of the Zend_Db_Table class, it queries the
> metadata for the table from the database, so Zend_Db_Table is able to
> discover the primary key column(s) in most cases.
>
> Typically, the only need to declare $_primary is if the DBMS doesn't
> report its primary key column(s), or if you defined your table with no
> primary key constraint (which isn't recommended anyway).
>
> Regards,
> Bill Karwin
>
--
View this message in context: http://www.nabble.com/compound-primary-key-tp19052927p19055272.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论