2017-03-03 6 views
-1

엔티티 매핑에서이 오류가 발생합니다. 연관 EventBundle \ Entity \ Articles # comentaires는 존재하지 않는 소유 필드 인 EventBundle \ Entity \ Articles # Commentaire를 참조합니다. 그래서 엔티티 기사에서 ->엔티티 매핑

/** 
* @ORM\OneToMany(targetEntity="Articles", mappedBy="Commentaire") 
*/ 
private $comentaires; 

과 기업 Commentaire

/** 
    * @ORM\ManyToOne(targetEntity="Articles", inversedBy="Commentaire") 
    * @ORM\JoinColumn(name="article_id", nullable=true) 
    */ 
private $articles; 
+1

무엇이 문제입니까? 질문하는 방법은 [mcve]를 참조하십시오. –

답변

0

당신이 "$ comentaires"을 쓰기 때문에이 "m entaires $ 닷컴":

대신이다

그리고 나는 당신의 주석이 거짓이라고 생각합니다. 다음과 같이 작성하십시오 :

@ORM\OneToMany(targetEntity="Commentaire", mappedBy="Articles")