-
Notifications
You must be signed in to change notification settings - Fork 617
Relation mapping using the most abstract label #2459
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
I've created test project to reproduce the issue https://github.com/idun-corp/neo4j-test |
Thanks for spotting this. I thought that I did something to avoid the override. Must have been wrong ;) |
No problem! Looking forward to the fix! Wish you Merry Christmas and happy holidays |
There will be a little early Christmas present available for you with version |
@meistermeier thank you for the fix. I'm still testing. Are you interested in other issues I may notice during my work? Anyway I'm using neo4j and Neo4j Spring Data actively. |
Great, thanks for the feedback. |
@meistermeier Thank you! Finally I've finished testing the new fix! Looks good! Looking forward for release! |
Hello again team :)
I continue working over migrating our code to the new Spring Data. And currently I'm testing version 6.2.1-SNAPSHOT. Lets consider the case:
So lets consider that Neo4j DB has Node(Boy) that has 1 relation to 1 Cat and 1 relation to 1 Dog, I assumed that projection view that looks like below should work and should result List pets with size 2 but results with NULL:
RETURN petOwner1{.*, PetOwner_hasPet_Animal | [....]}
But what I observed in DefaultNeo4jEntityConverter class (lines 349-354) relation mapping is executed in two phases using abstract source label and using concrete source label. During first phase PetOwner_hasPet_Animal is mapped well but during next phase mapped values are overwritten with empty ArrayList. MapAccessor values (line 542) doesn't contain key "Boy_hasPet_Animal" and empty collection is instantiated (line 658).
https://github.com/spring-projects/spring-data-neo4j/blob/6.2.x/src/main/java/org/springframework/data/neo4j/core/mapping/DefaultNeo4jEntityConverter.java
Thank you for the assistance!
The text was updated successfully, but these errors were encountered: