public function createSelectionInstance($table = NULL) { return new self($this->context, $this->conventions, $table ?: $this->name, $this->cache ? $this->cache->getStorage() : NULL); }
/** * Deletes row. * @return int number of affected rows */ public function delete() { $res = $this->table->createSelectionInstance()->wherePrimary($this->getPrimary())->delete(); if ($res > 0 && ($signature = $this->getSignature(FALSE))) { unset($this->table[$signature]); } return $res; }