fix creation of group ids
This commit is contained in:
parent
5c04deadd4
commit
7520fef31f
|
@ -179,6 +179,8 @@ public class DatabaseUtils {
|
|||
|
||||
if (forceUpdate || openaireConflictRepository.countByGroupNull() > 0) {
|
||||
|
||||
log.info("Recreating conflicts group...");
|
||||
|
||||
openaireConflictRepository.resetGroupIds();
|
||||
|
||||
final Map<String, Set<String>> groups = new HashMap<>();
|
||||
|
@ -212,6 +214,8 @@ public class DatabaseUtils {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
log.info("...conflicts group recreated");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -287,11 +291,13 @@ public class DatabaseUtils {
|
|||
return jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(OrganizationConflict.class), id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void importSimRels() {
|
||||
try {
|
||||
log.info("Importing conflicts and duplicates...");
|
||||
jdbcTemplate.update(IOUtils.toString(getClass().getResourceAsStream("/sql/importNewRels.sql")));
|
||||
log.info("...done");
|
||||
verifyConflictGroups(true);
|
||||
} catch (final Exception e) {
|
||||
log.error("Error importing conflicts and duplicates", e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue