/** * Persist an ordo to the database * * @param ORDataObject $ordo */ function persist() { $db = Zend_Registry::get('dbAdapter'); $this->_inPersist = true; $sql = $this->toSQL(); $this->_inPersist = false; //echo $sql . "<br />";ob_flush(); $stmt = $db->query($sql); $stmt->closeCursor(); $this->postPersist(); if ($this instanceof Document && $this->signatureNeeded()) { ESignature::createSignatureEntry($this); } if ($this->shouldAudit() && get_class($this) != "Audit" && get_class($this) != "AuditValue") { WebVista_Model_ORM::audit($this); } return $this; }