How to get transactional a repository ? #36625
Replies: 2 comments 4 replies
-
Hi @nicolasduminil ! To the topic at hand: I do not fully understand what the use-case is. Could you elaborate (in zulip or on stackoverlfow) what exactly the use case is? |
Beta Was this translation helpful? Give feedback.
-
Hi, I converted this into a Discussion, which should be used for questions as explained by @turing85 . Regarding your question, I don't know if there is a way to make repositories transactional. I suppose you already tried adding In any case, the way this is usually done is to annotate the methods that call the repository as
See also https://quarkus.io/guides/transaction#declarative-approach |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I want to use the Panache's repository pattern. But extending the
PanacheRepository
doesn't provide transactional operations. For example, the following repository:won't provide me with a transactional
persist()
operation. Accordingly, I have to override all the required write only methods inPanacheRepository
in order to add@Transactional
to them. And there are a lot of them. How could I get transactional write only operations from thePanacheRepository
while avoiding having to override all these methods ?Many thanks in advance.
Nicolas
Beta Was this translation helpful? Give feedback.
All reactions