行( )が「 ?」Zend_Db_Table_Row
に設定される原因は何ですか。readOnly
ループ内の行を削除するのに問題があります:
// this is set to some integers
$ids = array();
// get the results
$results = $table->fetchAll($select);
foreach ($results as $result)
{
$value = $result->value;
if (!in_array($value, $ids))
{
// throws a "row is read-only" error
$result->delete();
}
}
これが私の選択です:
$table = $options->joinModel;
$select = $table->select();
$select->from($table->getTableName(), array("id", "value" => $options->joinForeignKey))
->where("`{$options->foreignKey}` = ?", $row->id)
->group($options->joinForeignKey);
$ ids配列にない行を削除したいのですが、行が読み取り専用であるというエラーがスローされます。私はそのフラグを設定したり、行に対して何もしていません。なぜ読み取り専用なのか、何か考えはありますか?