Working with ItemsList
I have an itemsList table. I want to save in my entity a field with value of param. such as admin.php?target=returned_products&order=<Some Value of Param>. For that task I put in class that defined the table this method :
* Create entity
* @return \XLite\Model\AEntity
protected function createEntity()
$entity = parent::createEntity();
But stil didn't work and throw me error :
An exception occurred while executing 'INSERT INTO xc_retur_product (position, enabled, form_id, code, qty) VALUES (?, ?, ?, ?, ?)' with params [0, 1, null, "<Value>", "<Value>"]: SQLSTATE: Integrity constraint violation: 1048 Column 'form_id' cannot be null.
What method do i need in order to set this field before i persist in database ? I don't want to show in table that particular column.