Related to #4242
Bug description
Using the method deleteJobInstance from JobRepository does not work if a JobExecution still has StepExecutions
Explications from my understanding
The work done in this commit works well: when you call JobRepository.findJobExecutions() it returns the JobExecutions with all the StepExecutions
However when you call JobRepository.deleteJobInstance() the method called for retrieving the JobExecutions is not JobRepository.findJobExecutions() but this.jobExecutionDao.findJobExecutions(jobInstance) thus resulting in the abscence of the StepExecutions in the JobExecutions
Environment
Spring Batch 5.0.1
Steps to reproduce
- Create a new Job.
- Try to delete all Executions/Instances of this Job using
deleteJobInstance
- Foreign Key Constraint Violation error occurs
Expected behavior
All objects are correctly deleted from the database using deleteJobInstance
Thanks in advance for the consideration
Related to #4242
Bug description
Using the method
deleteJobInstancefrom JobRepository does not work if a JobExecution still has StepExecutionsExplications from my understanding
The work done in this commit works well: when you call
JobRepository.findJobExecutions()it returns the JobExecutions with all the StepExecutionsHowever when you call
JobRepository.deleteJobInstance()the method called for retrieving the JobExecutions is notJobRepository.findJobExecutions()butthis.jobExecutionDao.findJobExecutions(jobInstance)thus resulting in the abscence of the StepExecutions in the JobExecutionsEnvironment
Spring Batch 5.0.1
Steps to reproduce
deleteJobInstanceExpected behavior
All objects are correctly deleted from the database using
deleteJobInstanceThanks in advance for the consideration