Reputation: 10030
I am getting this error from Doctrine:
The mappings X\Answer#question and X\Question#answers are inconsistent with each other.
I don't see what is wrong with it?
The classes are:
Answer:
/**
* @ORM\ManyToOne(targetEntity="Question", inversedBy="answers")
* @ORM\JoinColumn(name="question_id", referencedColumnName="question_id")
*/
private $question;
Question:
/**
* @ORM\OneToMany(targetEntity="Answer", mappedBy="item")
*/
protected $answers;
public function __construct()
{
$this->answers = new ArrayCollection();
}
Upvotes: 0
Views: 16