From 77046b41bed0169868d4f280d611e52e311e3ea0 Mon Sep 17 00:00:00 2001 From: Vladislav Frolov <50615459+Cheshiriks@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:34:05 +0300 Subject: [PATCH] Fixed create organization (#2925) --- .../com/saveourtool/save/repository/ValidateRepository.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/ValidateRepository.kt b/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/ValidateRepository.kt index 07514103e5..935e5b5f15 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/ValidateRepository.kt +++ b/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/ValidateRepository.kt @@ -3,6 +3,7 @@ package com.saveourtool.save.repository import org.springframework.data.jpa.repository.Modifying import org.springframework.data.jpa.repository.Query import org.springframework.data.repository.query.Param +import org.springframework.transaction.annotation.Transactional /** * Controller that handles operation with validate @@ -19,6 +20,7 @@ interface ValidateRepository { * @param name */ @Query("""insert into save_cloud.high_level_names set name = :name""", nativeQuery = true) + @Transactional @Modifying fun saveHighLevelName(@Param("name") name: String) @@ -26,6 +28,7 @@ interface ValidateRepository { * @param name */ @Query("""delete from save_cloud.high_level_names where name = :name""", nativeQuery = true) + @Transactional @Modifying fun deleteHighLevelName(@Param("name") name: String) }