spring-projects / spring-data-neo4j

Provide support to increase developer productivity in Java when using Neo4j. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
http://spring.io/projects/spring-data-neo4j
Apache License 2.0
832 stars 618 forks source link

Add support Nesting Loop Fetch [DATAGRAPH-934] #1497

Closed spring-projects-issues closed 6 years ago

spring-projects-issues commented 7 years ago

David Vincent opened DATAGRAPH-934 and commented

After upgrade from Spring Data Neo4j 3 to Spring Data Neo4j 4, some feature cannot be used. For example this issue, SDN 4 / Neo4j OGM only supports one level of nesting at this point in time. The finder I'm trying to execute is two levels of nesting: LeftRight->left->parent

I create the question at Stackoverflow here : http://stackoverflow.com/questions/40924912/sdn4-neo4j-3-0-6-neo4j-ogm-2-0-5-cannot-fetch-when-findbypropertyparentid/40947187#40947187

And this is the sample project according to my Stackoverflow Question : https://github.com/daviduck123/spring-data-neo4j-4


Affects: 4.1.4 (Hopper SR4), 4.1.5 (Hopper SR5)

Issue Links:

spring-projects-issues commented 6 years ago

Nicolas Mervaillie commented

At the moment SDN does not support fetching on more than one nested entity attribute. This will work : findByAddressName (if name is a string in the Address class) This won't : findByAddressCountryName (if country is an entity defined in the address)

The workaround is to use a custom cypher query.

The underlying mechanism is based on top of OGM filters, which are not ideal to do that. Ideally this should be done on top of a cypher query DSL which does not exist yet.

spring-projects-issues commented 6 years ago

Gerrit Meier commented

Fixed in DATAGRAPH-1091