2010年6月2日星期三

Re: [fw-db] Zend_Db_Table_Exception : "A table must have a primary key, but none was found"

Hi.

Normally, what you need in your class is this variable:

protected $_primary = 'your_primary_key';  OR

protected $_primary = array( 'primary_1', 'primary_2' .....);

This error might occur when the model cannot detect the primary key, often it's because you have more than one.

--Best regards and good luck
Hilmar

2010/5/25 zamanphp <zamanphp@gmail.com>

hi all
I'm using Zend_Cachefor Zend_Db_Table_Abstract
Sometimes Htay following occurs:
"A table must have a primary key, but none was found"
While I'm have in the my table primary key.
and Refresh the page to be resolved
 What Is Problem؟

--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Zend-Db-Table-Exception-A-table-must-have-a-primary-key-but-none-was-found-tp2230044p2230044.html
Sent from the Zend DB mailing list archive at Nabble.com.


没有评论: