-
Notifications
You must be signed in to change notification settings - Fork 165
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
The name of a RelationshipEntity
for a single node relation is limited the relationship name
#1132
Comments
This is indeed interesting if this should really happen. From what I can see in our test suite this should not be a problem. |
Hi! |
This would be very helpful, thanks. |
I managed to put it together here: https://github.com/oxisto/kotlin-ogm-test |
Seems to be an obvious fix, not sure if this is really enough. Fixes neo4j#1132
From the given example (and sorry that I missed this in the examples above), I can see that this is expected behaviour in Neo4j-OGM. It fails with the NPE because it cannot find the matching definition for the "unknown" relationship type. Also see this in the reference documentation: https://neo4j.com/docs/ogm-manual/current/reference/#reference:annotating-entities:relationship-entity |
That only seems to be partially true because the |
Unfortunately being |
This is a little bit of a complicated issue, but it seems I encounter a somewhat weird behaviour, if one uses
RelationshipEntity
objects for single-node relationships.Consider the following (Kotlin) code:
(the real example code is a bit more complex with generics, but the issue still seems to persist with this small example)
When trying to persist this I get the following error:
If I change the
@Relationship
name toASTEDGE
(matching the relationship entity class in uppercase), the graph persists without problems. Persisting a list of such entities withBODY
also works.Expected Behavior
I would expect that the above sample works.
Current Behavior
See stack-trace
The text was updated successfully, but these errors were encountered: