lazy loading with doctrine one to one mapping

前端 未结 3 2076
一向
一向 2021-02-12 20:39

I am having a hard time finding the correct result for this.

I have one to one mapping. There are two tables:

/**
* @ORM\\Table(name=\"users\")
* @ORM\\E         


        
3条回答
  •  既然无缘
    2021-02-12 21:17

    Use hint HINT_FORCE_PARTIAL_LOAD to avoid lazy-loading.

    ...
    $qb->getQuery()->setHint(Query::HINT_FORCE_PARTIAL_LOAD, true);
    

提交回复
热议问题