Getting a “true” object from a proxy object in doctrine2

前端 未结 11 1464
南笙
南笙 2021-02-01 13:50

Doctrine uses proxy objects to represent related objects in order to facilitate lazy loading. This is a really cool feature, but its causing an issue with something I am trying

11条回答
  •  醉梦人生
    2021-02-01 14:49

    The solution I found is to extend the Reflection Hydrator and use the new class as Hal extractor params, for complex entities.

    You can find the code here:

    Synergy of proxy object of doctrine and zend expressive hal

    probably.

提交回复
热议问题