Completed test coverage for DDC-3634
This commit is contained in:
parent
cbdf23ca65
commit
4c119c44a1
@ -19,6 +19,8 @@ class DDC3634Test extends OrmFunctionalTestCase {
|
||||
try {
|
||||
$this->_schemaTool->createSchema([
|
||||
$this->_em->getClassMetadata(DDC3634Entity::CLASSNAME),
|
||||
$this->_em->getClassMetadata(DDC3634JTIBaseEntity::CLASSNAME),
|
||||
$this->_em->getClassMetadata(DDC3634JTIChildEntity::CLASSNAME),
|
||||
]);
|
||||
} catch (ToolsException $e) {
|
||||
// schema already in place
|
||||
@ -51,6 +53,16 @@ class DDC3634Test extends OrmFunctionalTestCase {
|
||||
|
||||
$this->assertInternalType('string', $entity->id);
|
||||
}
|
||||
|
||||
public function testSavesIntegerAutoGeneratedValueAsStringWithJoinedInheritance()
|
||||
{
|
||||
$entity = new DDC3634JTIChildEntity();
|
||||
|
||||
$this->_em->persist($entity);
|
||||
$this->_em->flush();
|
||||
|
||||
$this->assertInternalType('string', $entity->id);
|
||||
}
|
||||
}
|
||||
|
||||
/** @Entity */
|
||||
@ -62,6 +74,28 @@ class DDC3634Entity
|
||||
public $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Entity
|
||||
* @InheritanceType("JOINED")
|
||||
* @DiscriminatorMap({
|
||||
* DDC3634JTIBaseEntity::class = DDC3634JTIBaseEntity::class,
|
||||
* DDC3634JTIChildEntity::class = DDC3634JTIChildEntity::class,
|
||||
* })
|
||||
*/
|
||||
class DDC3634JTIBaseEntity
|
||||
{
|
||||
const CLASSNAME = __CLASS__;
|
||||
|
||||
/** @Id @Column(type="bigint") @GeneratedValue(strategy="AUTO") */
|
||||
public $id;
|
||||
}
|
||||
|
||||
/** @Entity */
|
||||
class DDC3634JTIChildEntity extends DDC3634JTIBaseEntity
|
||||
{
|
||||
const CLASSNAME = __CLASS__;
|
||||
}
|
||||
|
||||
class DDC3634LastInsertIdMockingConnection extends Connection
|
||||
{
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user