R
ragtek
Guest
Why do we need to set the value in the datamanager if it's not saving the value and we need to run a extra query?
For example
Shouldn't this save the value without the need to run the db update? (it doesn't do this, but i don't understand why
)
For example
PHP:
if ($rows)
{
// TODO: ideally, this can be consolidated with other post-save message updates (see updateIpData)
$this->set('attach_count', $this->get('attach_count') + $rows, '', array('setAfterPreSave' => true));
$this->_db->update($this->getDiscussionMessageTableName(), array(
'attach_count' => $this->get('attach_count')
), $this->getDiscussionMessageKeyName() . ' = ' . $this->_db->quote($this->getDiscussionMessageId()));
}
