From ceca66387d250917e5cdfa5e583c75861802f590 Mon Sep 17 00:00:00 2001 From: Anatoly Karlov Date: Tue, 5 Nov 2024 17:27:42 +0700 Subject: [PATCH] fix returning ProviderCallback id --- src/main/java/dev/vality/disputes/dao/ProviderCallbackDao.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/dev/vality/disputes/dao/ProviderCallbackDao.java b/src/main/java/dev/vality/disputes/dao/ProviderCallbackDao.java index 6be0e6c..b8c9ad3 100644 --- a/src/main/java/dev/vality/disputes/dao/ProviderCallbackDao.java +++ b/src/main/java/dev/vality/disputes/dao/ProviderCallbackDao.java @@ -15,7 +15,6 @@ import java.util.List; import java.util.Optional; import java.util.UUID; -import static dev.vality.disputes.domain.tables.Dispute.DISPUTE; import static dev.vality.disputes.domain.tables.ProviderCallback.PROVIDER_CALLBACK; @Component @@ -34,7 +33,7 @@ public class ProviderCallbackDao extends AbstractGenericDao { var record = getDslContext().newRecord(PROVIDER_CALLBACK, providerCallback); var query = getDslContext().insertInto(PROVIDER_CALLBACK) .set(record) - .returning(DISPUTE.ID); + .returning(PROVIDER_CALLBACK.ID); var keyHolder = new GeneratedKeyHolder(); execute(query, keyHolder); return Optional.ofNullable(keyHolder.getKeyAs(UUID.class)).orElseThrow();