3 namespace Doctrine\Tests\ORM\Functional\Ticket;
5 use Doctrine\Common\Collections\ArrayCollection;
7 require_once __DIR__ . '/../../../TestInit.php';
9 class DDC960Test extends \Doctrine\Tests\OrmFunctionalTestCase
11 protected function setUp()
15 $this->_schemaTool->createSchema(array(
16 $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC960Root'),
17 $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC960Child')
19 } catch(\Exception $e) {
27 public function testUpdateRootVersion()
29 $child = new DDC960Child('Test');
30 $this->_em->persist($child);
33 $child->setName("Test2");
37 $this->assertEquals(2, $child->getVersion());
43 * @InheritanceType("JOINED")
45 * "root" = "DDC960Root",
46 * "child" = "DDC960Child"
52 * @Id @GeneratedValue @Column(type="integer")
57 * @Column(type="integer") @Version
61 public function getId()
66 public function getVersion()
68 return $this->version;
75 class DDC960Child extends DDC960Root
78 * @column(type="string")
83 public function __construct($name)
88 public function setName($name)