Hi,
We are using Manage Customer Attribute Extension and customized this to fetch records from the eav_attribute table and we are getting the exception as:
$entityTypeId = $this->entityModel->setType(
\Magento\Customer\Model\Customer::ENTITY
)->getTypeId();
parent::_initSelect();
//Join eav attribute table
$this->getSelect()->joinLeft(
['eav_attribute' => $this->getTable('eav_attribute')],
'eav_attribute.attribute_id = main_table.attribute_id'
);
$this->getSelect()->where('eav_attribute.entity_type_id=?',$entityTypeId);
When i am executing it getting below error as
Integrity constraint violation: 1052 Column 'attribute_code' in order clause is ambiguous, query was: SELECT `main_table`.*, `eav_attribute`.* FROM `vendor_mymarket_vendor_form_attribute` AS `main_table`
LEFT JOIN `eav_attribute` ON eav_attribute.attribute_id = main_table.attribute_id WHERE (eav_attribute.entity_type_id=9) ORDER BY attribute_code ASC
Can any one tell me solution for it?