/**
  * Detaches a document from the DocumentManager, causing a managed document to
  * become detached.  Unflushed changes made to the document if any
  * (including removal of the document), will not be synchronized to the database.
  * Documents which previously referenced the detached document will continue to
  * reference it.
  *
  * @param object $document The document to detach.
  */
 public function detach($document)
 {
     if (!is_object($document)) {
         throw new \InvalidArgumentException(gettype($document));
     }
     $this->_unitOfWork->detach($document);
 }