get a partial reference in Doctrine

Code
<?php

use PHPSnippets\Db\Entity\Test;

/**
 * @see http://doctrine-orm.readthedocs.org/en/latest/reference/partial-objects.html
 */

// get Entity partial reference with id 1
$ref $entityManager->getPartialReference(Test::CLASS, 1);

// Access data returns no values, but its id
var_dump($ref->id$ref->name);
Result
int(1)
NULL