symfony2でdoctrineを使っているのですが、
複数条件によるselectで502が出てしまいます。
こちらを参考にしました。
http://symfony2-gf.blogspot.jp/2011/10/model-doctrine_17.html
こちらはselectできますが
$em = $this->getDoctrine()->getEntityManager(); $repository = $this->getDoctrine() ->getRepository('AcmeHelloBundle:User'); $user = $repository->findOneBy(array('name' => 'taro'));
こちらは502エラーになります。
$em = $this->getDoctrine()->getEntityManager(); $repository = $this->getDoctrine() ->getRepository('AcmeHelloBundle:User'); $user = $repository->findOneBy(array('name' => 'taro', 'category_id' => 1));
データはあります。
mysql> select * from users; | id | name | description | category_id | +----+-----------+-------------------+-------------+ | 8 | taro | 太郎です | 1 | | 9 | taro | 太郎です | 1 |
回答1件
あなたの回答
tips
プレビュー