Open filipenfst opened 1 year ago
I have fixed a few cases, but we cannot propagate the context when the Kotlin Flow is used: https://github.com/micronaut-projects/micronaut-data/pull/1921. Maybe it would be possible in Micronaut 4. I'm planning a new propagation API. Thanks for reporting and the example!
Steps to Reproduce
When using the
@Transactional
on a method that returns a kotlin flow i am getting aNoTransactionException
The same error also happens when using
ReactiveStreamsCrudRepository
or when using declarative transactionsExpected Behaviour
The transaction should be propagated on the context and it should be committed only after the last item on the flow is collected
Actual Behaviour
Fails with the given stack
Environment Information
Example Application
Here you can find some tests that reproduces the error