Hi guys,
I've got this list of non-persistable objects which contains duplicates. The id of the object is different, but the attribute value is the same.
Goal: I want to create a list without any duplicates in attribute value.
So, what I'm doing right now is iterate over the list. For every object, I filter the original list on attribute value. If a duplicate is found, I remove it from the list to iterate over and delete it.
Problem: I see the number of objects in the original list decreasing, but the loop still iterates over the objects I removed and deleted. It seems the loop has a list in cache that doesn't respond to list-actions within the loop.
Is there another way to do this?
Thanks!