Collection:
protected function _initSelect()
{
parent::_initSelect();
$this->getSelect()->joinLeft(
['secondTable' => $this->getTable('ekvi_employee_salary')], //2nd table name by which you want to join
'main_table.employee_id = secondTable.employee_id', // common column which available in both table
'*' // '*' define that you want all column of 2nd table. if you want some particular column then you can define as ['column1','column2']
)->where('secondTable.store_id = ? ', 0);
return $this;
}
Backend Admin Add New E.G: .../admin_fkozk7/routeId/module/new/key/zzzzzzzz
The issue That I have is when Adding new Employee It loads the joint with the WHERE Condition and employee_id would be empty hence is the error. How Should this be resolved/approached when adding new raw?
Anyone Appreciate!