Removing related entities in nested Datasource in 6.4RC

I was removing related entities in nested datasources with button click event:

public void onButton_Click() {
    for (MyNestedEntity ne : MyNestedDatasourceDs.getItems())

That works perfectly in 6.3, in 6.4 gives a ConcurrentModificationException.
Is this a Bug? What’s the way to do it?


Hi Pedro,

Thank you for pointing out this difference - we’ll mention it in the release notes.

The issue is caused by the fact that getItems() method now returns an unmodifiable collection instead of full copy as previously. So you now cannot modify the collection when iterating through it at the same time. But you can do the same as follows:

for (UUID id : orderLinesDs.getItemIds()) {


for (OrderLine orderLine : new ArrayList<>(orderLinesDs.getItems())) {
1 Like