Leave out discriminator part of Doctrine' generated SQL
问题 Assume the following AbstractPage model: /* * @ORM\Entity * @ORM\Table(name="page") * @ORM\InheritanceType("SINGLE_TABLE") * @ORM\DiscriminatorColumn(name="type", type="string") * @ORM\DiscriminatorMap * ({ * "page" = "Page", * "link" = "Link" * }) */ And the following DQL query: SELECT p FROM \Page\Model\AbstractPage The generated SQL will be: SELECT ... FROM page p0_ WHERE p0_.type IN ('page', 'link') Now to the question: how can I remove the WHERE clause from this query. On more complex