_schemaTool->createSchema(array( $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC1509File'), $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC1509Picture'), )); } catch (\Exception $ignored) { } } public function testPostLoadOnChild() { $class = $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC1707Child'); $entity = new DDC1707Child(); $event = new LifecycleEventArgs($entity, $this->_em); $class->invokeLifecycleCallbacks(\Doctrine\ORM\Events::postLoad, $entity, $event); $this->assertTrue($entity->postLoad); } } /** * @Entity * @InheritanceType("SINGLE_TABLE") * @DiscriminatorMap({"c": "DDC1707Child"}) * @HasLifecycleCallbacks */ abstract class DDC1707Base { /** * @Id @Column(type="integer") @GeneratedValue */ protected $id; public $postLoad = false; /** * @PostLoad */ public function onPostLoad() { $this->postLoad = true; } } /** * @Entity */ class DDC1707Child extends DDC1707Base { }