class MetadataDao extends NamedParameterJdbcDaoSupport {

    public List<MetadataEntryWithIssuesCount> loadMetadataItemsWithIssues(List<EntityVO> entities) {
        List<MetadataEntryWithIssuesCount> items = getNamedParameterJdbcTemplate()
                .query(convertEntitiesToString(loadMetadataItemsWithIssuesQuery, entities),
                        MetadataParameters.getParametersWithArrays(entities),
                        MetadataParameters.getRowMapperWithIssues());
        return items.isEmpty() ? null : items;
    }

}