Mapping Doctrine Inheritance with Abstract Base Class

I have a question about doctrine matching strategies.

There are two ways to achieve inheritance: MappedSuperclass or Inheritance Mapping. I am trying to do the following:

/** 
 * @ORM\Entity
 * @ORM\InheritanceType("SINGLE_TABLE")  
 * @ORM\DiscriminatorColumn(name="type", type="string")
 * @ORM\DiscriminatorMap({"B" = "B","C" = "C"})
 * @ORM\HasLifecycleCallbacks
 */
abstract class A {
    OneToManyMappingToD
}

/** 
 * @ORM\Entity
 */
class B {
}

/** 
 * @ORM\Entity
 */
class C {
}

/** 
 * @ORM\Entity
 * @ORM\InheritanceType("SINGLE_TABLE")  
 * @ORM\DiscriminatorColumn(name="type", type="string")
 * @ORM\DiscriminatorMap({"E" = "E","F" = "F"})
 * @ORM\HasLifecycleCallbacks
 */
abstract class D {
    ManyToOneToA
}

/** 
 * @ORM\Entity
 */
class E {
}

/** 
 * @ORM\Entity
 */
class F {
}

Confirmation of the matching does not take into account any problems, the matching of the files is in order. But when I use these objects in the form of → submit (), I have to wait about 30 seconds, and Doctrine makes more than 8,000 calls. So I think that something is wrong with my image.

MappedSuperClasses, oneToMany. , , A D Map, . A D , .

, 8 000 SELECT ?

!

+3

All Articles