Replies: 4 comments 2 replies
-
/cc @geoand |
Beta Was this translation helpful? Give feedback.
-
lol..if he wrote that section of the doc, I would expect no less :-) From what I understand of the Spring annotation, it still is a transaction, but a read-only one... |
Beta Was this translation helpful? Give feedback.
-
There have been long discussions about this, e.g. #10077 This might help: #10077 (comment) |
Beta Was this translation helpful? Give feedback.
-
Can't you achieve the same (in Panache or on the entityManager) by setting the QueryHint.READ_ONLY to true ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://www.baeldung.com/transaction-configuration-with-jpa-and-spring
Sorry for a bit of a Quarkus noob question, but is there something similar to
@transactional(readonly=true)?
This page hints at it:
https://quarkus.io/guides/transaction
"I don’t need transaction when I do read only operations, it’s faster.
Wrong.
First off, just disable the transaction by marking your transaction boundary with @transactional(NOT_SUPPORTED) (or NEVER or SUPPORTS depending on the semantic you want)."
But as I understand it, the Spring version will actually automatically switch over to a read-only data source if it's defined (e.g. a read-only replica). The Quarkus NOT_SUPPORTED etc. variations don't seem to?
Beta Was this translation helpful? Give feedback.
All reactions