code: public void saveModification(MaterialInstance materialInstance, Modification modification) {
          modification.setMaterialInstance(materialInstance);
          try {
              getHibernateTemplate().saveOrUpdate(modification);
              removeLatestCachedModification(materialInstance, modification);
              removeCachedModificationCountFor(materialInstance);
              removeCachedModificationsFor(materialInstance);
          } catch (Exception e) {
              String message = "Cannot save modification " + modification;
              LOGGER.error(message, e);
              throw new RuntimeException(message, e);
          }
      }
docs: Used in tests