Weird Doctrine ODM exception when using references together with inheritance

▼魔方 西西 提交于 2019-12-06 07:58:02
Tobias

I think it is too late for your question, but maybe there are other users having the same problem (as me).

The problem is related to Foobar being a MappedSuperclass. Had the same problem as described by you and at https://github.com/doctrine/mongodb-odm/issues/241.

Solution is to not reference the abstract class Foobar (=MappedSuperclass) but a concrete implementation (=Document) - as in your case - Game.

See also Doctrine ODM returns proxy object for base class instead of sub-classed document

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!