Reputation: 2895
i have entity
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discr", type="string")
*/
class Contact extends BaseUser
and
class MyContact extends Contact
{
and have name MyBundle:MyContact name and want get all Contact rows not only MyContact how to do this ?
can i get base inheritance class for MyBundle:MyContact ?
Upvotes: 0
Views: 111
Reputation: 2987
You can just use the repository for the base entity:
// assuming $entityManager is available
$contactList = $entityManager
->getRepository('MyBundle:Contact')
->findAll();
Upvotes: 1