protected function getRid(Proxy $proxy) { $metadata = $this->getManager()->getClassMetadata(get_parent_class($proxy)); return $metadata->getIdentifierValues($proxy); }