Hi All,
In my use case I need to fetch for data that is not explicitly mapped to a class annotated with
@Node
. It seems like there is no method that returns a generic result set (just like in SQL
) that could be consumed and mapped to an user's will.
I know that in spring boot context there is Driver
bean, that could allow running a query like this, but unfortunately, it creates it's own transaction and that is a thing I would like to to avoid.
So to cut the long story short, is there any class that is aware of current spring boot managed transaction and allows to run a query that doesn't map to a DomainClass
.
dependency i use in my project:
org.springframework.boot:spring-boot-starter-data-neo4j:latest
Class in question that almost provides what I want is Neo4jTemplate
(but can't execute query with non-DomainClass result type).
Only solution I thought of is to create generic result class node type and use it to wrap around my results e.g create it with appropriate properties and then return it, but it seems too farfetched for me.