getReference() публичный Метод

Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded.
public getReference ( mixed $identifier ) : object
$identifier mixed The entity identifier.
Результат object The entity reference.
Пример #1
0
 /**
  * @test
  */
 public function getsReference()
 {
     $user = new User();
     $this->em->persist($user);
     $this->em->flush();
     $this->assertInstanceOf('FactoryGirl\\Tests\\Provider\\Doctrine\\ORM\\TestEntity\\User', $this->repository->getReference($user->id));
 }