Neo4jTemplate.DefaultExecutableQuery.getSingleResult() always executes in non-readonly transaction #2953
Open
Description
When activating Neo4jTransactionManager.setValidateExistingTransaction(true)
a simple findById()
will result in an IllegalStateException
. This is due to getSingleResult()
always executing in the default transactional-template
whereas the outer call findById()
executes in a readonly-transaction.
How to reproduce:
- activate transaction validation as described in @michael-simons tips (see below)
- call
findById()
on a neo4j-template or -repository
See also