예제 #1
0
 /**
  * stops the transaction if we are not currently saving in a submodel
  * @param  Boolean $fail
  * @return Model   $this
  */
 public function stopTransaction($fail = false)
 {
     if ($fail) {
         $this->failTransaction();
     }
     if ($this->inTransaction() && !$this->_is_inner_save) {
         $this->getMasterDB()->CompleteTrans();
         \Sky\Memcache::end();
     }
     return $this;
 }