QueryException in Connection.php line 651:
SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. (SQL: ROLLBACK TO SAVEPOINT trans2)
My main code has DB::beginTransaction(); seems cause issue with
in Node.php I commented transaction closure on setDepth method and it works.
public function setDepth() {
$self = $this;
//comment the transaction since the main code covered
//$this->getConnection()->transaction(function() use ($self) {
$self->reload();
$level = $self->getLevel();
$self->newNestedSetQuery()->where($self->getKeyName(), '=', $self->getKey())->update(array($self->getDepthColumnName() => $level));
$self->setAttribute($self->getDepthColumnName(), $level);
//});
return $this;
}
Please help to check and update the code.
Notes, It happen every where has the code "getConnection()->transaction" so I comments every where.
I just got this errors.
QueryException in Connection.php line 651: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. (SQL: ROLLBACK TO SAVEPOINT trans2)
My main code has DB::beginTransaction(); seems cause issue with
in Node.php I commented transaction closure on setDepth method and it works.
Please help to check and update the code.
Notes, It happen every where has the code "getConnection()->transaction" so I comments every where.