New to symfony. I am following this documentation. I have multiple entities mapped from tables imported from another application which did not create repositories automatically and there are a lot of entites to do it by hand. However I want create a single repository class that interfaces multiple entities.
My current Repository according to the documention is
Product repository
class ProductRepository extends ServiceEntityRepository
{
public function __construct(RegistryInterface $registry)
{
parent::__construct($registry, Product::class);
}
I will be using it in my controller like,
$respository = $this->getDoctrine()->getRepository(Product::class);
However I have other entity classes as well,
Customer, User
to name a few.
How or is it possible to use just Product Respository
to interface with these other entities like
$respositoryUser = $this->getDoctrine()->getRepository('User');
or is it possible to auto generate Repositories from an already existing entities.