bradtraversy / symphart

Simple article CRUD app built with Symfony 4
59 stars 63 forks source link

Column 'body' cannot be null #2

Open Chapullin opened 5 years ago

Chapullin commented 5 years ago

Leaving empty body in the form, it returns: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'body' cannot be null

I edit \src\Entity\Article.php

/**
 * @ORM\Column(type="text", nullable=true)
 */
private $body = null;

and works perfectly.

MoatazAbdAlmageed commented 5 years ago

@Chapullin Good catch , I suggest you create a pull request for this update and ask @bradtraversy to check and merge it.