code: protected SingularAttribute<? super E, ?> getVersionAttribute(EntityType<E> entityType) {
          for (SingularAttribute<? super E, ?> sa : entityType.getSingularAttributes()) {
              if (sa.isVersion()) {
                  return sa;
              }
          }
          return null;
      }
docs: /*
  _HACK_ too bad that JPA does not provide this entityType.getVersion();
  <p>
  http://stackoverflow.com/questions/13265094/generic-way-to-get-jpa-entity-version