2
$this->model = Doctrine::getTable('Model');
$model = $this->model->find(1);
var_dump($model->id);
// returns: string '1' (length=1)
var_dump($model->toArray());
// returns: array
// 'id' => null
// ...
爲什麼會發生呢?PHP主義 - 指定者()設置爲 'ID' 的鍵值設置爲null
好找,謝謝你的分享! – BenV 2010-09-20 04:43:27