Skip to content
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

Fixed NullPointerException in EntityGraphMapper::mapEntityReference #1134

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

oxisto
Copy link
Contributor

@oxisto oxisto commented Aug 8, 2024

Seems to be an obvious fix, not sure if this is really enough.

Fixes #1132

oxisto and others added 2 commits August 8, 2024 23:02
Seems to be an obvious fix, not sure if this is really enough.

Fixes neo4j#1132
@michael-simons
Copy link
Collaborator

Thanks for your contribution, @oxisto

I added a test for that scenario onto your branch.
In general, this is kinda broken (the scenario): It can only happen if you

  • have a relationship entity class
  • Purposely use a different type on the ends in the node than in the relationship class

While it now won't generate an NPE, you would not be able to store properties this way and I surely recommend fixing the types (use the same type in both @Relationship and @RelationshipEntity.

@michael-simons michael-simons merged commit bb9e29a into neo4j:master Aug 19, 2024
1 check passed
@oxisto oxisto deleted the fix-npe-is-abstract branch August 19, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The name of a RelationshipEntity for a single node relation is limited the relationship name
2 participants