1
0
mirror of synced 2025-02-03 22:09:26 +03:00
2017-06-12 23:04:54 +02:00

70 lines
1.4 KiB
PHP

<?php
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\Tests\OrmFunctionalTestCase;
class DDC144Test extends OrmFunctionalTestCase
{
protected function setUp() {
parent::setUp();
$this->_schemaTool->createSchema(
[
$this->_em->getClassMetadata(DDC144FlowElement::class),
$this->_em->getClassMetadata(DDC144Operand::class),
]
);
}
/**
* @group DDC-144
*/
public function testIssue()
{
$operand = new DDC144Operand;
$operand->property = 'flowValue';
$operand->operandProperty = 'operandValue';
$this->_em->persist($operand);
$this->_em->flush();
}
}
/**
* @Entity
* @Table(name="ddc144_flowelements")
* @InheritanceType("JOINED")
* @DiscriminatorColumn(type="string", name="discr")
* @DiscriminatorMap({"flowelement" = "DDC144FlowElement", "operand" = "DDC144Operand"})
*/
class DDC144FlowElement
{
/**
* @Id @Column(type="integer") @GeneratedValue
* @var int
*/
public $id;
/** @Column */
public $property;
}
abstract class DDC144Expression extends DDC144FlowElement
{
abstract public function method();
}
/** @Entity @Table(name="ddc144_operands") */
class DDC144Operand extends DDC144Expression
{
/** @Column */
public $operandProperty;
public function method()
{
}
}