public function isNew() { if (parent::isNew()) { return true; } if (!$this->_table instanceof dmDoctrineTable) { return false; } foreach ($this->_table->getPrimaryKeys() as $pk) { if (!$this->get($pk)) { return true; } } return false; }