I have a custom admin module which store customer related data. My custom table created foreign key with customer_id.

I displayed customer name, email in my module grid by join query, It's working but how to set data to edit action by join query.


1 Answer 1


I have completed by add below function to Model Resource

protected function _getLoadSelect($field, $value, $object)
    $select = parent::_getLoadSelect($field, $value, $object);

        array('t_b' => 'table_b'),
        $this->getMainTable() . '.id = t_b.id',
    return $select;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.