3 namespace Doctrine\Tests\ORM\Functional\Ticket;
9 class DDC1515Test extends \Doctrine\Tests\OrmFunctionalTestCase
11 public function setUp()
14 $this->_schemaTool->createSchema(array(
15 $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC1515Foo'),
16 $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC1515Bar'),
20 public function testIssue()
22 $bar = new DDC1515Bar();
23 $this->_em->persist($bar);
26 $foo = new DDC1515Foo();
28 $this->_em->persist($foo);
32 $bar = $this->_em->find(__NAMESPACE__ . '\DDC1515Bar', $bar->id);
33 $this->assertInstanceOf(__NAMESPACE__.'\DDC1515Foo', $bar->foo);
43 * @OneToOne(targetEntity="DDC1515Bar", inversedBy="foo") @Id
54 * @Id @Column(type="integer") @GeneratedValue
59 * @OneToOne(targetEntity="DDC1515Foo", mappedBy="bar")