Skip to content

Neo4jTemplate sometimes doesn't save entity correctly when using projections #2661

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

Closed
Pandalei97 opened this issue Jan 20, 2023 · 1 comment
Assignees
Labels
status: needs-investigation An issue that has been triaged but needs further investigation

Comments

@Pandalei97
Copy link

Pandalei97 commented Jan 20, 2023

Hi, I have recently find that sometimes the entities are not saving correctly when using Neo4jTemplate.saveAs(entity, projection.class).

You can find a demo in my repository. You can call the endpoint '/entity/example' to reproduce the problem.

In my demo, sometimes the entity 'Identifier' is empty, sometimes it's not.

You can find a video attached at the root of the project.

I can't figure out if its the problem in the driver or in Neo4jTemplate.

Thanks in advance for your response.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 20, 2023
@meistermeier meistermeier self-assigned this Jan 20, 2023
@meistermeier meistermeier added status: needs-investigation An issue that has been triaged but needs further investigation and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 20, 2023
meistermeier added a commit that referenced this issue Jan 24, 2023
There was a random picking of correct property paths
if they represented the very same length (1).
Added a `isEntity` filter to be sure that only the interesting
property paths get returned.

Closes #2661
meistermeier added a commit that referenced this issue Jan 24, 2023
There was a random picking of correct property paths
if they represented the very same length (1).
Added a `isEntity` filter to be sure that only the interesting
property paths get returned.

Closes #2661
meistermeier added a commit that referenced this issue Jan 24, 2023
There was a random picking of correct property paths
if they represented the very same length (1).
Added a `isEntity` filter to be sure that only the interesting
property paths get returned.

Closes #2661
@meistermeier meistermeier added this to the 6.3.8 (2021.2.8) milestone Jan 24, 2023
@meistermeier
Copy link
Collaborator

Thanks for reporting this. There was indeed some kind of randomness in the projection parts detection.
I merged the fix from 6.2.x onwards. But SDN 6.2.x has reached it OSS EOL already (https://github.com/spring-projects/spring-data-commons/wiki/Spring-Data-2021.1-(Q)-Release-Notes#release-dates)
I assume that there won't be any releases. You can still check the snapshot release 6.2.11-SNAPSHOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-investigation An issue that has been triaged but needs further investigation
Projects
None yet
Development

No branches or pull requests

3 participants