Doctrine 2 – Disallow null value on foreign keys of ManyToOne relationships June 5, 2023 by Tarik https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/annotations-reference.html#annref_joincolumn Add nullable = false to the JoinColumn annotation: @ORM\JoinColumn(..., nullable=false)