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

Regression: ensure RelationshipEntities not referenced by NodeEntitie… #326

Merged
merged 1 commit into from
Feb 13, 2017

Conversation

vince-bickers
Copy link

…s can be loaded. Fixes #309

Description

This PR restores the correct hydration of relationship entities where the referenced start and end node entities do not themselves maintain a reference to the relationship.

Related Issue

https://jira.spring.io/browse/DATAGRAPH-944

Motivation and Context

A recent commit made to support polymorphic relationship entities introduced a change in behaviour for relationship entities whose start and end nodes don't maintain an explicit reference to that relationship. These relationship entities were not being properly hydrated.

This PR restores the previous behaviour for such relationship entities.

How Has This Been Tested?

An explicit test for this scenario has been added to the RelationshipEntityTest class

Types of changes

  • [x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [ x] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [ x] I have read the CONTRIBUTING document.
  • [ x] I have added tests to cover my changes.
  • [ x] All new and existing tests passed.

Copy link
Member

@nmervaillie nmervaillie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me
Tested it with SDN 4.2 snapshot. All tests are green.
The problematic test case now works.

@mangrish mangrish merged commit a6b9cb8 into master Feb 13, 2017
@mangrish mangrish deleted the refactor-entity-access-hierarchy branch February 13, 2017 12:13
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.

First level relationship object is not getting converted with OGM returns null.
3 participants