Folks, could you please clarify for me, should `@T...
# spring
a
Folks, could you please clarify for me, should
@Transactional
work on
suspend
functions or not? OTOH I see a closed issue https://github.com/spring-projects/spring-framework/issues/22915, on the other hand, it's not mentioned in docs contrary to TransactionalOperator. I'm confused
@sdeleuze sorry for pinging you directly, I know you have a lot of channels, but it seems you worked on this and i don't know who else to ask
s
It should be supported as of Spring Boot 3.2 only with the Reactive stack (Spring Data R2DBC for example).
a
Nice! And what's the suggested pattern of usage? Reactive repository + kotlin adapter to flux/mono in service with the Transactional annotation?
Ah, I see, it's
CoroutineCrudRepository
, sorry
s
Yep you should probably use directly the Coroutines API.
a
Thank you! And for the raw SQL it will be
client.sql(...)
and then conversion, right?
s
There should be Coroutines extensions (usually starting by
await
on all Reactive APIs.
a
Thanks a lot!