code: @Override
      public void clear() {
          readOnlyGuardCondition();
  
          for (D item : this) {
              instance.removeRelation(entity, writeAttributeName, item);
          }
          entity.save();
      }
docs: Removes all of the elements from this collection.
  
  @throws UnsupportedOperationException if object is read only.
  @see java.util.Collection#clear().