-
Notifications
You must be signed in to change notification settings - Fork 617
Polymorphism: relationships not populated for subtypes #2639
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
Thanks for the report. A first glance shows that the problem is somewhere between query generator and mapper. |
In an inheritance situation, SDN might not search in the result for the right name of the list of relationships from the generic query. This change
I have now a branch with a not-yet clean patch (issue/gh-2639).
|
Thanks for the quick response and the fix! It worked out of the box on the ACME Corp example code. I will try to break ACME Corp again next week ;) |
Thanks for your fast feedback on the changes. |
I tried to add some properties to the relationships. Looking at the database everything seems to be inserted fine, but loading the score (developer -> language) fails with |
Thanks! I missed one spot for the abstraction detection. |
To me everything looks good now. What will be the target version of this fix? Will the dependency of spring-boot-starter:2.7.6 be updated (so that we resolve this fix without any manual changes)? |
That's what we're here for: magic 🪄 |
In an inheritance situation, SDN might not search in the result for the right name of the list of relationships from the generic query. Closes #2639
In an inheritance situation, SDN might not search in the result for the right name of the list of relationships from the generic query. Closes #2639
Hi everybody!
I'm experiencing problems loading lists of related objects when polymorphism is involved.
The data model:
Company
references its employees by their commonPerson
supertype.The implementations of
Person
areSales
andDeveloper
.Developer
references a list ofLanguage
.(see below for simplified classes)
Data retrieval
Data initially is stored using a
CompanyRepository extends Neo4jRepository<Company, Long>
.Looking into Neo4j Browser reveals nothing unusual and everything seems fine.
But when querying for companies by
Company findByName(String name);
the returned developers have an empty ListprogrammingLanguages
.Versions used
Example implementation
acme-corp.zip
Classes (simplified)
The text was updated successfully, but these errors were encountered: