Symfony2 forms interpret blank strings as nulls

前端 未结 7 2276
温柔的废话
温柔的废话 2021-02-19 09:12

I have a Symfony2 form with a variety of fields, including one optional text field called recap.

This recap field saves perfectly when there\'s

7条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-19 09:22

    I also came across this problem. And an elegant solution was suggested to me was: to make this definition @ORM\Column(type="string", length=50, nullable=true)

提交回复
热议问题