【发布时间】:2012-04-01 08:35:13
【问题描述】:
我收到“500 Internal Server Error - LogicException: Unable to guess how to get a Doctrine instance from the request information”。
这是我的控制器的动作定义:
/**
* @Route("/gatherplayer/{player_name}/{gather_id}")
* @Template()
*/
public function createAction(Player $player, Gather $gather)
{
// ...
}
而且它不起作用,可能是因为 Doctrine 2 不能“猜测”......那么我如何让 Doctrine 2 猜测,嗯?
【问题讨论】:
-
你应该看看@ParamConverter注解。
标签: php symfony doctrine-orm