Andrus Adamchik created CAY-2954:
------------------------------------
Summary: Don't wrap selecting queries in transactions
Key: CAY-2954
URL: https://issues.apache.org/jira/browse/CAY-2954
Project: Cayenne
Issue Type: Task
Reporter: Andrus Adamchik
Assignee: Andrus Adamchik
Cayenne surrounds every DB interaction with a transaction. This doesn't make
sense for single select operations (the only case where it would is long
running externally managed transactions, where selects should see uncommitted
DB state produced by prior changes; though should be handled at the DataSource
level).
So let's bypass implicit transactions when we can. Since Cayenne has no idea
whether the query requires a tx or not, the indicator should be provided by the
query itself (\{{q.getMetadata().isReadOnly()}}). Most queries know whether
they are "read-only" or not. For those that don't (such as
{color:#000000}ProcedureQuery) it will default to "false".{color}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)