Skip to content

Commit

Permalink
MODCON-88 move @transactional to service
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsiana-tarhonskaya committed Aug 18, 2023
1 parent 7c600e6 commit 07b7cd8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface TenantDetailsRepository extends JpaRepository<TenantDetailsEntity, String> {
@Transactional
@Modifying
@Query("UPDATE TenantDetailsEntity t SET t.setupStatus= ?1 WHERE t.id= ?2")
void setSetupStatusByTenantId(TenantDetails.SetupStatusEnum setupStatus, String tenantId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public Tenant update(UUID consortiumId, String tenantId, Tenant tenantDto) {
}

@Override
@Transactional
public void updateTenantSetupStatus(String tenantId, String centralTenantId, SetupStatusEnum setupStatus) {
try (var ctx = new FolioExecutionContextSetter(prepareContextForTenant(centralTenantId,
folioExecutionContext.getFolioModuleMetadata(), folioExecutionContext))) {
Expand Down

0 comments on commit 07b7cd8

Please sign in to comment.