2016-12-09 26 views
0
私は、私が行うことができます documentからsymfonyの3 にパスパラメータから2つのエンティティオブジェクトを取得する必要があり

:その@Entityはどこから来るsymfonyのルーティング注釈エンティティ

/** 
* @Route("/blog/{id}/comments/{comment_id}") 
* @Entity("comment", expr="repository.find(comment_id)") 
*/ 
public function showAction(Post $post, Comment $comment) 
{ 
} 

しかし、私は見つけることができませんでした。エラーのページ返信:

[Semantical Error] The annotation "@Entity" in method ABCBundle\Controller\ABCController::editAction() was never imported. Did you maybe forget to add a "use" statement for this annotation? in /srv/www/symfony3/src/ABCBundleController (which is being imported from "/srv/www/symfony3/src/ABCBundle/Resources/config/routing.yml"). 

誰にも分かりますか?

答えて

0

あなたはこのuseステートメントを追加することもできます。

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Entity; 

SensioFrameWorkExtraBundle at github

を参照してください。
関連する問題