docs: protected void addSortedInserts(List<DbOperation> flush) {
      for (Entry<Class<?>, SortedSet<DbEntityOperation>> operationsForType : inserts.entrySet()) {
  
        // add inserts to flush
        if(HasDbReferences.class.isAssignableFrom(operationsForType.getKey())) {
          // if this type has self references, we need to resolve the reference order
          flush.addAll(sortByReferences(operationsForType.getValue()));
        } else {
          flush.addAll(operationsForType.getValue());
        }
      }
    }