Pull request #672: RED-6468 - Exception in persistence service for DownloadCleanupJob (very rarely)
Merge in RED/persistence-service from bugfix/RED-6468 to master * commit 'a2feec73e65115063366223e4347e60f5fcf37cf': RED-6468 - Exception in persistence service for DownloadCleanupJob (very rarely) - changed the lazy loading to eager for dossier in download status entity
This commit is contained in:
commit
6220a85c76
@ -61,7 +61,7 @@ public class DownloadStatusEntity {
|
||||
@Column
|
||||
long fileSize;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
DossierEntity dossier;
|
||||
|
||||
@ManyToMany
|
||||
|
||||
@ -63,7 +63,7 @@ public class DownloadCleanupJob implements Job {
|
||||
downloadStatus.getCreationDate().plusHours(applicationConfigurationEntity.getDownloadCleanupNotDownloadFilesHours()),
|
||||
now);
|
||||
deleteDownload(downloadStatus);
|
||||
} else if (dossier != null && dossierService.getDossierById(dossier.getId()).getSoftDeletedTime() != null) {
|
||||
} else if (dossier != null && dossier.getSoftDeletedTime() != null) {
|
||||
log.info("3. Deleting download {}, because dossier does not exist", downloadStatus.getStorageId());
|
||||
deleteDownload(downloadStatus);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user