Is there a way to enable nested transactions when ...
# exposed
l
Is there a way to enable nested transactions when using
exposed-spring-boot-starter
? I was able to get a test case working by manually creating a connection per https://github.com/JetBrains/Exposed/wiki/Transactions#using-nested-transactions but we’re using https://github.com/JetBrains/Exposed/blob/master/exposed-spring-boot-starter/README.md and I don’t see a hook for enabling nested transactions.
1
e
just register your own
DatabaseConfig
with
useNestedTransactions
set to true?
l
Yes, I found the
@ConditionalOnMissingBean(DatabaseConfig::class)
in the autoconfig source code a couple hours later and doing exactly what you propose worked, thank you!
e
191 Views