Doctrine 「The left side of the join between the aliases '○○○' and 'XXX' must have at least the primary key field(s) selected.」 の対処法

そのままですが

「'○○○' and 'XXX' must have at least the primary key field(s) selected.」

の場合、'○○○'テーブルと、'XXX'テーブルの主キーを

SELECT句で抽出項目に加えるとエラーになりません。

例)
SELECT ○○○.id , XXX.id  ~

とすればOKです!

コメント

人気の投稿