File tree Expand file tree Collapse file tree 7 files changed +12
-56
lines changed
Eav/Model/ResourceModel/Form/Attribute
Newsletter/Model/ResourceModel
SalesRule/Model/ResourceModel/Rule
lib/internal/Magento/Framework/Data/Collection Expand file tree Collapse file tree 7 files changed +12
-56
lines changed Original file line number Diff line number Diff line change @@ -54,16 +54,6 @@ protected function _construct()
5454 $ this ->_map ['fields ' ]['block_id ' ] = 'main_table.block_id ' ;
5555 }
5656
57- /**
58- * @inheritDoc
59- */
60- public function _resetState (): void
61- {
62- parent ::_resetState ();
63- $ this ->_map ['fields ' ]['store ' ] = 'store_table.store_id ' ;
64- $ this ->_map ['fields ' ]['block_id ' ] = 'main_table.block_id ' ;
65- }
66-
6757 /**
6858 * Returns pairs block_id - title
6959 *
Original file line number Diff line number Diff line change @@ -47,16 +47,6 @@ protected function _construct()
4747 $ this ->_map ['fields ' ]['store ' ] = 'store_table.store_id ' ;
4848 }
4949
50- /**
51- * @inheritDoc
52- */
53- public function _resetState (): void
54- {
55- parent ::_resetState ();
56- $ this ->_map ['fields ' ]['page_id ' ] = 'main_table.page_id ' ;
57- $ this ->_map ['fields ' ]['store ' ] = 'store_table.store_id ' ;
58- }
59-
6050 /**
6151 * Set first store flag
6252 *
Original file line number Diff line number Diff line change @@ -96,6 +96,16 @@ protected function _construct()
9696 }
9797 }
9898
99+ /**
100+ * @inheritDoc
101+ */
102+ public function _resetState (): void
103+ {
104+ parent ::_resetState ();
105+ $ this ->_store = null ;
106+ $ this ->_entityType = null ;
107+ }
108+
99109 /**
100110 * Get EAV website table
101111 *
Original file line number Diff line number Diff line change @@ -67,15 +67,6 @@ protected function _construct()
6767 $ this ->_init (\Magento \Newsletter \Model \Queue::class, \Magento \Newsletter \Model \ResourceModel \Queue::class);
6868 }
6969
70- /**
71- * @inheritDoc
72- */
73- public function _resetState (): void
74- {
75- parent ::_resetState ();
76- $ this ->_map ['fields ' ]['queue_id ' ] = 'main_table.queue_id ' ;
77- }
78-
7970 /**
8071 * Joins templates information
8172 *
Original file line number Diff line number Diff line change @@ -106,22 +106,6 @@ protected function _construct()
106106 $ this ->_map ['fields ' ]['store_id ' ] = 'main_table.store_id ' ;
107107 }
108108
109- /**
110- * @inheritDoc
111- */
112- public function _resetState (): void
113- {
114- parent ::_resetState ();
115- $ this ->_map ['fields ' ]['type ' ] = $ this ->getResource ()->getConnection ()->getCheckSql (
116- 'main_table.customer_id = 0 ' ,
117- 1 ,
118- 2
119- );
120- $ this ->_map ['fields ' ]['website_id ' ] = 'store.website_id ' ;
121- $ this ->_map ['fields ' ]['group_id ' ] = 'store.group_id ' ;
122- $ this ->_map ['fields ' ]['store_id ' ] = 'main_table.store_id ' ;
123- }
124-
125109 /**
126110 * Set loading mode subscribers by queue
127111 *
Original file line number Diff line number Diff line change @@ -96,15 +96,6 @@ protected function _construct()
9696 $ this ->_map ['fields ' ]['rule_id ' ] = 'main_table.rule_id ' ;
9797 }
9898
99- /**
100- * @inheritDoc
101- */
102- public function _resetState (): void
103- {
104- parent ::_resetState ();
105- $ this ->_map ['fields ' ]['rule_id ' ] = 'main_table.rule_id ' ;
106- }
107-
10899 /**
109100 * Map data for associated entities
110101 *
Original file line number Diff line number Diff line change @@ -127,10 +127,10 @@ public function _resetState(): void
127127 {
128128 parent ::_resetState ();
129129 $ this ->setConnection ($ this ->_conn );
130- $ this -> _idFieldName = null ;
130+ // Note: not resetting _idFieldName because some subclasses define it class property
131131 $ this ->_bindParams = [];
132132 $ this ->_data = null ;
133- $ this -> _map = null ;
133+ // Note: not resetting _map because some subclasses define it class property but not _construct method.
134134 $ this ->_fetchStmt = null ;
135135 $ this ->_isOrdersRendered = false ;
136136 $ this ->extensionAttributesJoinProcessor = null ;
You can’t perform that action at this time.
0 commit comments