public function setValueAndWakeProxy($document, $value)
    {
        if ($document instanceof Proxy && !$document->__isInitialized()) {
            //property changes to an uninitialized proxy will not be tracked or persisted,
            //so the proxy needs to be loaded first.
            $document->__load();
        }

        $this->setValue($document, $value);

        return $this;
    }