code: private Multimap<Object, Object> selectMrefIDsForAttribute(
        EntityType entityType,
        AttributeType idAttributeDataType,
        Attribute mrefAttr,
        Set<Object> ids,
        AttributeType refIdDataType) {
      Stopwatch stopwatch = null;
      if (LOG.isTraceEnabled()) stopwatch = createStarted();
  
      String junctionTableSelect = getSqlJunctionTableSelect(entityType, mrefAttr, ids.size());
      LOG.trace("SQL: {}", junctionTableSelect);
  
      Multimap<Object, Object> mrefIDs = ArrayListMultimap.create();
      jdbcTemplate.query(
          junctionTableSelect,
          getJunctionTableRowCallbackHandler(idAttributeDataType, refIdDataType, mrefIDs),
          ids.toArray());
  
      if (LOG.isTraceEnabled())
        LOG.trace(
            "Selected {} ID values for MREF attribute {} in {}",
            mrefIDs.values().stream().collect(counting()),
            mrefAttr.getName(),
            stopwatch);
      return mrefIDs;
    }
docs: Selects MREF IDs for an MREF attribute from the junction table, in the order of the MREF
  attribute value.
  
  @param entityType EntityType for the entities
  @param idAttributeDataType {@link AttributeType} of the ID attribute of the entity
  @param mrefAttr Attribute of the MREF attribute to select the values for
  @param ids {@link Set} of {@link Object}s containing the values for the ID attribute of the
  entity
  @param refIdDataType {@link AttributeType} of the ID attribute of the refEntity of the
  attribute
  @return Multimap mapping entity ID to a list containing the MREF IDs for the values in the
  attribute