File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/code/Magento/Catalog/Model/ResourceModel/Product Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Catalog \Model \ResourceModel \Product ;
7
7
8
+ use Magento \Framework \App \ObjectManager ;
8
9
use Magento \Framework \Model \ResourceModel \Db \AbstractDb ;
9
10
use Magento \Framework \Model \ResourceModel \Db \Context ;
10
11
use Magento \Framework \EntityManager \MetadataPool ;
@@ -24,16 +25,16 @@ class Relation extends AbstractDb
24
25
25
26
/**
26
27
* @param Context $context
27
- * @param null $connectionName
28
+ * @param string $connectionName
28
29
* @param MetadataPool $metadataPool
29
30
*/
30
31
public function __construct (
31
32
Context $ context ,
32
33
$ connectionName = null ,
33
- MetadataPool $ metadataPool
34
+ MetadataPool $ metadataPool = null
34
35
) {
35
36
parent ::__construct ($ context , $ connectionName );
36
- $ this ->metadataPool = $ metadataPool ;
37
+ $ this ->metadataPool = $ metadataPool ?: ObjectManager:: getInstance ()-> get (MetadataPool::class) ;
37
38
}
38
39
39
40
/**
You can’t perform that action at this time.
0 commit comments