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

前端 未结 11 1460
南笙
南笙 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:43

    This will both convert the reference to a real object and fetch all the fields.

    $entityManager->refresh($proxyObject);
    

提交回复
热议问题