I need to override the class \Magento\Catalog\Model\Product\Link
using preference, which is working fine,but the above mentioned class has a proxy class generated automatically \Magento\Catalog\Model\Product\Link\Proxy
, which does not include the new methods added in the override. Is there any way we can inject those methods in the proxy class?
EDIT
I have tried to dig in to this and found that we can inject proxy using di.xml.
But when i tried to do that, i got an exception that the class Package\Module\Model\Class\Proxy
Does not exist.
That means the new proxy i am trying to generate is not being generated automatically.
di.xml
a preference for\Magento\Catalog\Model\Product\Link\Proxy
toPackage\Module\Model\Class\Proxy
? – Marius♦ May 18 '16 at 6:13