code: private function getIdentityForAliasedObject($object)
      {
          $originalObject = (new \ReflectionClass($this->className))->newInstanceWithoutConstructor();
          
          $this->copyFields($object, $originalObject);
          $id =$this->identifier->getIdentity($originalObject);
          $this->copyFields($originalObject, $object);
  
          return $id;
      }
docs: @param object $object
  
  @return mixed