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

Relations are not loaded, when the Start- and EndNode do not directly implement the interface the relation requires #491

Closed
Ph3n1x opened this issue May 22, 2018 · 1 comment

Comments

@Ph3n1x
Copy link

Ph3n1x commented May 22, 2018

Expected Behavior

On load, all relations and their nodes should be loaded (depending on the query depth of course)

Current Behavior

On load, only those, which directly implement IdHolder are loaded

Possible Solution

As a workaround, I could add IdHolder to the implements part of every node class.
A solution would maybe require to check recursively for all super classes/interfaces of the classes.

Steps to Reproduce (for bugs)

Here is the link to the very basic example: https://github.com/Ph3n1x/neo4j-sdn-ogm-issue-report-template/tree/master/issue-491

  1. Execute the test. It fails, although the data is persisted right before and if you check the database, the nodes and relation are also existing
  2. To workaround this issue, one could let Group directly implement IdHolder (although it already does through GroupInterface). When you then execute the test again, it works like a charm (see CHECKME in Group)

Context

I am working a lot with interfaces and interface inheritance. My relations are therefor very generic with the IdHolder beeing the main interface of all my nodes.

Your Environment

meistermeier added a commit that referenced this issue Oct 11, 2018
It is not possible to load a node that implements an interface
that also implements one. This commit changes the detection of
possible matches when loading generic relationship entities.

This fixes #491
@meistermeier
Copy link
Collaborator

Thanks for reporting this. As you can see there is already a pending PR to solve the problem. There was no stepping through the interface hierarchy as you have noticed.

meistermeier added a commit that referenced this issue Oct 12, 2018
It is not possible to load a node that implements an interface
that also implements one. This commit changes the detection of
possible matches when loading generic relationship entities.

This fixes #491
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

No branches or pull requests

2 participants