Is it possible to guarantee '@WithTransaction' presence at build time? #50052
Unanswered
daft-panda
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have had the pleasure of chasing a bug for many days where every function in a GRPC handler would log successful execution and yet nothing would show up in the database using Panache persist. Of course trying the same GRPC handler in a unit test with the
TransactionalUniAsserter
worked just fine. Luckily Claude pieced it together and changed the@WithSession
to the correct@WithTransaction
on the GRPC service class and presto, bug fixed.However I expect to make this mistake again and would like to guard against it. Is there any way, preferably as some form of static analysis runnable as a build step, that could alert me to a lack of a Transactional context for a code path?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions