protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aSmsLog !== null) { if ($this->aSmsLog->isModified()) { $affectedRows += $this->aSmsLog->save($con); } $this->setSmsLog($this->aSmsLog); } if ($this->isModified()) { if ($this->isNew()) { $pk = SmsLogRecipientPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += SmsLogRecipientPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }