Already googled and tried to do it completely from off-documentation and from examples that I found on similar issues does not work.

Entity \ Questions.php

/** * @var integer */ private $answersId; /** * Get answers * * @return string */ public function getAnswers() { return $this->answers; } /** * Set answersId * * @param integer $answersId * * @return AnswersId */ public function setAnswersId($answersId) { $this->answersId = $answersId; return $this; } 

Entity \ Answers.php

 /** * @var integer */ private $question_id; /** * Set question_id * * @param integer $question_id * * @return Answers */ public function setQuestions_id($question_id) { $this->question_id = $question_id; return $this; } /** * Get question_id * * @return integer */ public function getQuestion_id() { return $this->question_id; } 

Resources \ config \ doctrine \ Questions.orm.yml

 fields: question_id: type: integer oneToOne: answersId: targetEntity: Answers mappedBy: questionId 

Resources \ config \ doctrine \ Answers.orm.yml

 oneToOne: questionId: targetEntity: Questions inversedBy: answers joinColumn: name: question_id referencedColumnName: id 

    1 answer 1

    Change the name of the questionId field so that it would be the same everywhere for you, and not because you have question_id in one place and questionId in another place.