-
Notifications
You must be signed in to change notification settings - Fork 616
After Update to Spring Boot 2.4.1 , not able to fetch parent Object using custom query [DATAGRAPH-1473] #2034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, I had a similar issue. Basically, with something like this: @Node
class Technology {
private String name;
} @Node
class Application {
@Relationship("RELIES_ON")
private List<Technology> technologies;
} Then, on the repository side, trying to fetch an application and its technologies would return the application but with an empty set of technologies: @Query("MATCH (a:Application)" +
" OPTIONAL MATCH (a)-[r:RELIES_ON]->(t:Technology)" +
" RETURN a, r, t")
List<Application> fooBar(String name); It can be fixed this by using Also, it looks like the behavior changed even for 1:1 mapping in this version (e.g. this ticket on SO). I don't know if it is expected or not but maybe the documentation could be improve at this level as there seems to be behavioral differences between the previous SDN/OGM and SDN 6 regarding relationships. |
You are right in both cases @robin850: You need to make use of the |
Thanks, the issue got solved with the updated query suggested by @robin850 |
This gives me response with attributes of current node and it's parent's nodes, but it skips the grand-parent's attributes.
What should be the suggested change? @robin850 @meistermeier |
Before I open up a new issue on this one: Could you set the SDN version to 6.0.3 in your pom? |
wolfy027 opened DATAGRAPH-1473 and commented
Custom Query used in AnimalRepository >
@Query
:Spring Boot Version before update : 2.3.4
Spring Boot Version before update : 2.4.1
Domain reference:
All the other properties are parsed except for parent which is null for any animal.
Affects: 6.0.2 (2020.0.2)
The text was updated successfully, but these errors were encountered: