Fixed the way the listener compares two objects
This commit is contained in:
parent
aa7eb61088
commit
0bd6875f20
|
@ -25,7 +25,7 @@ class MergeCollectionListener implements EventSubscriberInterface
|
|||
} else {
|
||||
// merge $data into $collection
|
||||
foreach ($collection as $model) {
|
||||
if (!$data->contains($model)) {
|
||||
if ($data->search($model) === false) {
|
||||
$collection->remove($model);
|
||||
} else {
|
||||
$data->remove($model);
|
||||
|
|
Loading…
Reference in a new issue