code: public String collectionTableName(String ownerEntity, String ownerEntityTable, String associatedEntity,
        String associatedEntityTable, String propertyName) {
      String ownerTable = null;
      Class<?> entityClass = null;
      try {
        entityClass = Class.forName(ownerEntity);
      } catch (ClassNotFoundException e) {
      }
      // Just for annotation configuration,it's ownerEntity is classname(not entityName), and
      // ownerEntityTable is class shortname
      if (Character.isUpperCase(ownerEntityTable.charAt(0))) {
        ownerTable = tableNamingStrategy.classToTableName(entityClass);
      } else {
        ownerTable = tableName(ownerEntityTable);
      }
      String tblName = tableNamingStrategy.collectionToTableName(entityClass, ownerTable, propertyName);
      if (tblName.length() > MaxLength) logger.warn("{}'s length greate than 30!", tblName);
      return tblName;
    }
docs: Collection Table