Re: [doctrine-user] How to use polymorphism with Doctrine?

2018-02-15 Thread Marco Pivetta
See https://github.com/doctrine/doctrine2/issues/6072#issuecomment-363038318 Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Thu, Feb 15, 2018 at 3:48 PM, Dennis Matveyev wrote: > Consider this code: > public function getRepository() > { > return $this->getDoct

[doctrine-user] How to use polymorphism with Doctrine?

2018-02-15 Thread Dennis Matveyev
Consider this code: public function getRepository() { return $this->getDoctrine()->getRepository(ProductPricing::class); } public function getPriceObject(int $productId) { /** * * @var $priceObject ProductPricing */ return $this->getRepository()->findOneBy(arr