getArrayResult on entity with ManyToOne association

前端 未结 2 1273
南旧
南旧 2021-01-17 18:33

Having the follow basic tables (one-to-many relationship)
Client - Has many users.
Users - Each user belongs to single client.

In a very simple exampl

2条回答
  •  清歌不尽
    2021-01-17 19:32

    Try to set the HINT_INCLUDE_META_COLUMNS query hint on the query (not the builder) before you execute it.

    $q->setHint(Query::HINT_INCLUDE_META_COLUMNS, true);
    

提交回复
热议问题