Skip to content
Snippets Groups Projects
Verified Commit b8c5c5c8 authored by Jan-Niclas Strüwer's avatar Jan-Niclas Strüwer
Browse files

directly flushing db changes

parent 85f91de3
No related branches found
No related tags found
No related merge requests found
Pipeline #27329 passed
......@@ -14,6 +14,6 @@ class ToolService(
return toolRepository.findByNameIgnoreCase(
tool.name
)
?: toolRepository.save(tool.asDbObject())
?: toolRepository.saveAndFlush(tool.asDbObject())
}
}
......@@ -7,7 +7,6 @@ import de.fraunhofer.iem.dataprovider.tool.dto.CreateToolDto
import de.fraunhofer.iem.dataprovider.tool.service.ToolService
import de.fraunhofer.iem.dataprovider.toolRun.entity.LanguageEntity
import de.fraunhofer.iem.dataprovider.toolRun.entity.ToolRunEntity
import de.fraunhofer.iem.dataprovider.toolRun.repository.LanguageRepository
import de.fraunhofer.iem.dataprovider.toolRun.repository.ToolRunRepository
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
......@@ -15,7 +14,6 @@ import org.springframework.transaction.annotation.Transactional
@Service
class ToolRunDbService(
private val toolRunRepository: ToolRunRepository,
private val languageRepository: LanguageRepository,
private val repositoryService: RepositoryService,
private val toolService: ToolService
) {
......@@ -51,7 +49,7 @@ class ToolRunDbService(
}
toolRunRepository.save(toolRun)
toolRunRepository.saveAndFlush(toolRun)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.