Commit 296c34d6 authored by Oleksii Savran's avatar Oleksii Savran

Merge branch 'ui-223-map-selected-accessions' into 'master'

Added lazy load for accessions from 'for-uuid' method

See merge request genesys-pgr/genesys-server!404
parents fcf65b86 423a39dd
......@@ -251,6 +251,7 @@ public class AccessionController {
* @param uuids accession identifi`ers to lookup in DB
* @return list of Accessions
*/
@JsonView({ JsonViews.Public.class })
@PostMapping(value = "/for-uuid", produces = { MediaType.APPLICATION_JSON_VALUE })
public List<Accession> forUuids(@RequestBody Set<UUID> uuids) {
return accessionService.forUuids(uuids);
......
......@@ -261,6 +261,8 @@ public class AccessionServiceImpl implements AccessionService {
accessions.addAll((List<Accession>) accessionRepository.findAll(QAccession.accession.accessionId.uuid.in(chunk)));
}
accessions.forEach(this::lazyLoad);
return accessions;
}
......
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