@@ -105,8 +105,12 @@ public function getRelatedItemsOnUpdateQuery(
105
105
return null ;
106
106
}
107
107
108
- if (!$ element instanceof Concrete || !$ element ->getClass ()->getAllowInherit ()) {
109
- return $ this ->getRelatedItemsQueryBuilder ($ element , $ operation , $ operationTime , $ includeElement );
108
+ if (
109
+ ($ operation === IndexQueueOperation::DELETE ->value ) ||
110
+ !$ element instanceof Concrete ||
111
+ !$ element ->getClass ()->getAllowInherit ()
112
+ ) {
113
+ return $ this ->getElementQueryBuilder ($ element , $ operation , $ operationTime , $ includeElement );
110
114
}
111
115
112
116
if ($ operation !== IndexQueueOperation::UPDATE ->value ) {
@@ -153,7 +157,7 @@ public function getUpdateIndexDataEvent(
153
157
throw new InvalidArgumentException ('Element must be instance of ' . AbstractObject::class);
154
158
}
155
159
156
- private function getRelatedItemsQueryBuilder (
160
+ private function getElementQueryBuilder (
157
161
AbstractObject $ element ,
158
162
string $ operation ,
159
163
int $ operationTime ,
@@ -164,7 +168,7 @@ private function getRelatedItemsQueryBuilder(
164
168
}
165
169
166
170
$ queryBuilder = $ this ->dbConnection ->createQueryBuilder ()
167
- ->select ($ this ->getSelectParametersByOperation ($ element , $ operation , $ operationTime ))
171
+ ->select ($ this ->getSelectParameters ($ element , $ operation , $ operationTime ))
168
172
->setMaxResults (1 );
169
173
170
174
if ($ operation === IndexQueueOperation::DELETE ->value ) {
@@ -177,7 +181,7 @@ private function getRelatedItemsQueryBuilder(
177
181
->setParameter ('id ' , $ element ->getId ());
178
182
}
179
183
180
- private function getSelectParametersByOperation (
184
+ private function getSelectParameters (
181
185
AbstractObject $ element ,
182
186
string $ operation ,
183
187
int $ operationTime
0 commit comments