Get current session in SDN

How can I get the current session in a Neo4j SDN @Transactional method? e.g. if I want to run a query that is used only in one place and I do not want to make a separate method for it in a repository.

It seems that a SessionFactory must have a getCurrentSession method, but Neo4j SDN implementation does not provide such a method (See here).

1 Like

Also, this may be necessary if the query is build at run-time and we do not know what exactly the query is so that we put in in an annotation.

1 Like