What is the best practice to execute a query WITHOUT a transaction inside a Java Spring-Data-Neo4j app?
Is there an easy way to get to a driver's session (instead of an OGM session) or an even better solution to do this?
Reason for asking:
I want to do
USING PERIODIC COMMIT 10000 LOAD CSV but I can't do that on the normal OGM session since that always wraps the call in a TX.
This is not possible, there is always a transaction. Even without the OGM/SDN, Neo4j is transactional.
SDN is not really suitable for data import (see When not to use SDN) and you might want to look at other mechanisms for this. You could execute a script, or use the Bolt driver directly as an example.
That's exactly my point: I am doing it already directly on the Bolt driver but since I already have a working configuration (URL, Username, Password) set up for SDN I was wondering if there is an easier way to get to the DB driver
OR to avoid the session.query to always execute the query inside a TX.
...I guess not... thx for your reply!