Commit 075d0cc5 authored by Matija Obreza's avatar Matija Obreza
Browse files

Transaction & final batch fixed

parent f311c454
......@@ -87,6 +87,7 @@ public class InstituteServiceImpl implements InstituteService {
}
@Override
@Transactional(readOnly = false)
public void update(Collection<FaoInstitute> institutes) {
instituteRepository.save(institutes);
}
......
......@@ -133,6 +133,8 @@ public class InstituteUpdater {
}
}
workIt(batch);
batch.clear();
reader.close();
......@@ -187,6 +189,7 @@ public class InstituteUpdater {
}
for (String instCode : batchCopy.keySet()) {
LOG.info("Adding FaoInstitute with code: " + instCode);
toSave.add(insertData(batchCopy.get(instCode)));
}
......@@ -235,6 +238,7 @@ public class InstituteUpdater {
}
faoInstitute.setAcronym(acronym);
faoInstitute.setFullName(fullName);
LOG.info("Updating: " + fullName);
faoInstitute.setEmail(email);
faoInstitute.setType(type);
faoInstitute.setUrl(url);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment