following are the fields in my company entity
/**
* @var int
*
* @ORM\Column(name="plan", type="integer", nullable=true)
*/
private $plan;
/**
* @var float
*
* @ORM\Column(name="wallet", type="float", nullable=true)
*/
private $wallet;
/**
* @var string
*
* @ORM\Column(name="profpic", type="string", length=255, nullable=true)
*/
private $profpic;
/**
* @var float
*
* @ORM\Column(name="tod1", type="float", nullable=true)
*/
private $tod1;
/**
* @var float
*
* @ORM\Column(name="tod2", type="float", nullable=true)
*/
private $tod2;
/**
* @var string
*
* @ORM\Column(name="tod3", type="string", length=255, nullable=true)
*/
private $tod3;
yet I face this error while registration:
An exception occurred while executing 'INSERT INTO company (email, pass, type, name, level, plan, wallet, profpic, tod1, tod2, tod3) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["[email protected]", "test", "comp", null, 1, null, null, null, null, null, null]:
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null
what did I do wrong? Please help..
nullableparameter to your entity's attributes, but haven't updated the database schema. - Jakub Matczak