3 namespace Doctrine\Tests\ORM\Functional\Ticket;
4 use Doctrine\ORM\UnitOfWork;
6 require_once __DIR__ . '/../../../TestInit.php';
8 class DDC381Test extends \Doctrine\Tests\OrmFunctionalTestCase
10 protected function setUp()
15 $this->_schemaTool->createSchema(array(
16 $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC381Entity'),
18 } catch(\Exception $e) {
23 public function testCallUnserializedProxyMethods()
25 $entity = new DDC381Entity();
27 $this->_em->persist($entity);
30 $persistedId = $entity->getId();
32 $entity = $this->_em->getReference('Doctrine\Tests\ORM\Functional\Ticket\DDC381Entity', $persistedId);
34 // explicitly load proxy (getId() does not trigger reload of proxy)
35 $id = $entity->getOtherMethod();
37 $data = serialize($entity);
38 $entity = unserialize($data);
40 $this->assertEquals($persistedId, $entity->getId());
50 * @Id @Column(type="integer") @GeneratedValue
54 public function getId()
59 public function getOtherMethod()