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
838 stars 618 forks source link

Defining depth seems to have no effects when executing any find* method [DATAGRAPH-1047] #1611

Closed spring-projects-issues closed 6 years ago

spring-projects-issues commented 7 years ago

Alejandro Tarafa Guzman opened DATAGRAPH-1047 and commented

Specifying the depth in any find method did don't have any effect, the ogm continue loading only the first level of the tree from the root.

To reproduce this error only has to load the project attached, define the user and password for the neo4j connection and run the real integration test, "SimpleObject.java"


Affects: 5.0.1 (Kay SR1)

Reference URL: https://stackoverflow.com/questions/47159885/defining-depth-seems-to-have-no-effects-when-executing-any-find-method

Attachments:

spring-projects-issues commented 7 years ago

Nicolas Mervaillie commented

In the example there is only 1 level depth :

EntityA0

So I'm not sure to understand what's the problem here

spring-projects-issues commented 7 years ago

Alejandro Tarafa Guzman commented

Hi Nicolas, thanks for your quickly response,

If you run the project you will see that no matter what depth you define in the line 32 at the test class SimpleObject specifically "buildEndPointUrl(port, "entity", body.getId(),4)" where the 4 mean the depth value; the values inside entityA10 always will be empty.

EntityA0 -0 – EntityA1 -1 –StringValue -2

spring-projects-issues commented 7 years ago

Alejandro Tarafa Guzman commented

Please first run the app and after that, run the SimpleObject, this is a real api test(for real i mean no mock). I'm using neo4j 3.3.0

spring-projects-issues commented 7 years ago

Nicolas Mervaillie commented

may be related to https://github.com/neo4j/neo4j-ogm/issues/404

spring-projects-issues commented 7 years ago

Alejandro Tarafa Guzman commented

Thanks Nicholas! Is the same issue happening in my project, i solved my use case, by loading the entity with a custom query.

Hope soon this can be solved

spring-projects-issues commented 7 years ago

Nicolas Mervaillie commented

This should be addressed by commit 1722b5b4abed318acf101c13ec2ea04bf892cf92 of OGM. OGM v3.0.2 will be available by the end of the day, can you check it solves your problem please ?

spring-projects-issues commented 7 years ago

Alejandro Tarafa Guzman commented

Hi Nicolas, very thank you! OK i will test it and let you know! Thanks

spring-projects-issues commented 6 years ago

Nicolas Mervaillie commented

@atguz Did you have a chance to check this ?

spring-projects-issues commented 6 years ago

Alejandro Tarafa Guzman commented

Hi Nicolas, i will test this weekend and will let you know, thanks for your support!!