Primary key of owning side as a join column

后端 未结 4 721
借酒劲吻你
借酒劲吻你 2020-12-02 15:06

NOTE: Topic is lengthy but detailed and may come in handy if you use Doctrine2 and oneToOne relationships.

Recently I came across a problem in Doctrine:

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 15:20

    You could also force partial objects, to get rid off lazy-loading:

    use Doctrine\ORM\Query;
    
    //...
    $query->setHint(Query::HINT_FORCE_PARTIAL_LOAD, true);
    

提交回复
热议问题