/** * 创建或更新主表记录时,保存关联的数据 * * @param array $row 要保存的关联数据 * * @return boolean */ function _saveAssocDataBase(&$row) { switch (strtolower($this->saveAssocMethod)) { case 'create': return $this->assocTDG->create($row); case 'update': return $this->assocTDG->update($row); case 'replace': return $this->assocTDG->replace($row); default: return $this->assocTDG->save($row); } }
/** * 保存对象到数据库 */ function save() { $row =& $this->toArray(); $this->_table->save($row); }