/** * Remove field * * @param string $fieldName field name * @return \Sokil\Mongo\Document */ public function unsetField($fieldName) { if (!$this->has($fieldName)) { return $this; } parent::unsetField($fieldName); if ($this->getId()) { $this->operator->unsetField($fieldName); } return $this; }