Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions app/code/Magento/Catalog/Model/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements
*/
protected $_url;

/**
* @var ResourceModel\Category
*/
protected $_resource;

/**
* URL rewrite model
*
Expand Down Expand Up @@ -313,6 +318,16 @@ protected function getCustomAttributesCodes()
return $this->getCustomAttributeCodes->execute($this->metadataService);
}

/**
* @throws \Magento\Framework\Exception\LocalizedException
* @return \Magento\Catalog\Model\ResourceModel\Category
* @deprecated because resource models should be used directly
*/
protected function _getResource()
{
return parent::_getResource();
}

/**
* Get flat resource model flag
*
Expand Down
17 changes: 17 additions & 0 deletions app/code/Magento/Catalog/Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
*/
protected $_urlModel = null;

/**
* @var ResourceModel\Product
*/
protected $_resource;

/**
* @var string
*/
Expand Down Expand Up @@ -475,6 +480,18 @@ protected function _construct()
$this->_init(\Magento\Catalog\Model\ResourceModel\Product::class);
}

/**
* Get resource instance
*
* @throws \Magento\Framework\Exception\LocalizedException
* @return \Magento\Catalog\Model\ResourceModel\Product
* @deprecated because resource models should be used directly
*/
protected function _getResource()
{
return parent::_getResource();
}

/**
* {@inheritdoc}
*/
Expand Down