diff --git a/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/AbstractExposedWriteCRUDRepo.kt b/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/AbstractExposedWriteCRUDRepo.kt index ffbd69f2e5a..afdaa115286 100644 --- a/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/AbstractExposedWriteCRUDRepo.kt +++ b/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/AbstractExposedWriteCRUDRepo.kt @@ -60,9 +60,11 @@ abstract class AbstractExposedWriteCRUDRepo( } }.let { if (it > 0) { - select { - selectById(this, id) - }.limit(1).firstOrNull() ?.asObject + transaction(db = database) { + select { + selectById(this, id) + }.limit(1).firstOrNull() ?.asObject + } } else { null }