I can't set false
value to an entity column which type is boolean
.
/**
* @ORM\Column(type="boolean")
*/
private $isActive;
Sending JSON:
{myEntity: {isActive: false}}
...will cause:
Integrity constraint violation: 1048 Column 'is_active' cannot be null
While sending:
{myEntity: {isActive: 0}}
...will work fine
There are some similar answers on stackoverflow however none of the solution worked.
RAW COLUMN
+--------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| is_active | tinyint(1) | NO | | NULL | |
+-------------+--------------+------+-----+---------+-----------------+
EDIT
Read my answer below. It's not a Doctrine bug but MariaDB 10.2 serie.