Zend_Db_Table хранит первичные ключи в виде массива в случае использования составного ключа, поэтому, строго говоря, лучше (не обязательно) объявлять их так: -
class Model extends Zend_Db_Table_Abstract
{
public function __construct(array $config = null)
{
$this->_primary[1] = 'modelId';
parent::__construct($config);
//.............
Из докблока в Zend_Db_Table_Abstract: -
/**
* The primary key column or columns.
* A compound key should be declared as an array.
* You may declare a single-column primary key
* as a string.
*
* @var mixed
*/
protected $_primary = null;
И из док-блока для $ _identity: -
/**
* If your primary key is a compound key, and one of the columns uses
* an auto-increment or sequence-generated value, set _identity
* to the ordinal index in the $_primary array for that column.
* Note this index is the position of the column in the primary key,
* not the position of the column in the table. The primary key
* array is 1-based.
*
* @var integer
*/
protected $_identity = 1;
Так что вы, вероятно, можете использовать это вместо этого.
Если у вас только один столбец в первичном ключетогда он будет равен $ _primary [1].
Я думаю, это будет работать для вас: -
public function delete($primaryKey)
{
$where = $this->getAdapter()->quoteInto($this->_primary[1] .' = ?', $primaryKey);
return parent::delete($where);
}