Skip to content

Commit

Permalink
Optimize loading of EAV collections - remove filter of entity_type_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekiphp committed Mar 16, 2020
1 parent 201df92 commit 7f216f1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ protected function _prepareStaticFields()
protected function _initSelect()
{
$this->getSelect()->from(array('e' => $this->getEntity()->getEntityTable()));
if ($this->getEntity()->getTypeId()) {
$this->addAttributeToFilter('entity_type_id', $this->getEntity()->getTypeId());
}

return $this;
}

Expand Down

0 comments on commit 7f216f1

Please sign in to comment.