public void removeAllChildren() {
    this.update(
      () -> myChildren.clear(),
      (builder, packagingElementEntity) -> {
        CompositePackagingElementEntity entity = (CompositePackagingElementEntity)packagingElementEntity;
        // I just don't understand what to do to avoid this warning
        //noinspection unchecked
        builder.modifyEntity(CompositePackagingElementEntity.Builder.class, entity, o -> {
          //noinspection unchecked
          o.setChildren(new ArrayList<>());
          return Unit.INSTANCE;
        });
      }
    );
  }
public void removeAllChildren()