-
Notifications
You must be signed in to change notification settings - Fork 617
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
IllegalArgumentException: Duplicate Key thrown for two relationships with different direction #2918
Labels
type: bug
A general bug
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged
label
Jul 5, 2024
ma-ku
added a commit
to ma-ku/spring-data-neo4j
that referenced
this issue
Jul 5, 2024
Signed-off-by: Mathias Kühn <[email protected]>
Hej @ma-ku I'll investigate this week, but I am alone atm, will take a bit. |
michael-simons
added
type: bug
A general bug
and removed
status: waiting-for-triage
An issue we've not yet triaged
labels
Jul 10, 2024
Oh well, there was little to triage, thanks for the excellent reproducer and fix. I attributed your contribution proper and this makes it into the pending release this weeks. Cheers. |
michael-simons
added a commit
that referenced
this issue
Jul 10, 2024
…ionship. This avoids having duplicate keys in the map projection used to collect the nodes for each relationship in cases where a node has two relationships with the same name to the same label in different directions. Fixes #2918. Co-authored-by: Mathias Kühn <[email protected]>
michael-simons
added a commit
that referenced
this issue
Jul 10, 2024
…ionship. This avoids having duplicate keys in the map projection used to collect the nodes for each relationship in cases where a node has two relationships with the same name to the same label in different directions. Fixes #2918. Co-authored-by: Mathias Kühn <[email protected]>
michael-simons
added a commit
that referenced
this issue
Jul 10, 2024
…ionship. This avoids having duplicate keys in the map projection used to collect the nodes for each relationship in cases where a node has two relationships with the same name to the same label in different directions. Fixes #2918. Co-authored-by: Mathias Kühn <[email protected]>
Thank you very much. Trying to help where I can ;-) |
michael-simons
added a commit
that referenced
this issue
Jul 10, 2024
…ionship. This avoids having duplicate keys in the map projection used to collect the nodes for each relationship in cases where a node has two relationships with the same name to the same label in different directions. Fixes #2918. Co-authored-by: Mathias Kühn <[email protected]>
michael-simons
added a commit
that referenced
this issue
Oct 24, 2024
…ut directional prefix. This is a direct follow up on #2918, in which we added the suffix to the collection names. That change didn’t take custom queries into account and people are most likely still using the known pattern of `source_REL_target` and I would like to not break them. Therefor, we check now in the values list if a collection without suffix exists if we didn’t find one with and if so, use that. This fixes #2963.
michael-simons
added a commit
that referenced
this issue
Oct 24, 2024
…ut directional prefix. This is a direct follow up on #2918, in which we added the suffix to the collection names. That change didn’t take custom queries into account and people are most likely still using the known pattern of `source_REL_target` and I would like to not break them. Therefor, we check now in the values list if a collection without suffix exists if we didn’t find one with and if so, use that. This fixes #2963.
michael-simons
added a commit
that referenced
this issue
Oct 24, 2024
…ut directional prefix. This is a direct follow up on #2918, in which we added the suffix to the collection names. That change didn’t take custom queries into account and people are most likely still using the known pattern of `source_REL_target` and I would like to not break them. Therefor, we check now in the values list if a collection without suffix exists if we didn’t find one with and if so, use that. This fixes #2963.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a simple model that contains
Failure
nodes thanCAUSE
otherFailure
nodes when a particularCondition
is met. To avoid circular dependencies and potential full loading of the graph, we only provide relations on the condition node rather than having the inverse relation defined at theFailure
node.Since we are interested into
upstream
anddownstream
failures, we have two relationships defined which of course use the same typeCAUSE
but have opposite directions.After a completely detached change in another portion of the codebase we started receiving above error for the relationship between
Condition
andFailure
:IllegalArgumentException: Duplicate key 'ConditionNode_CAUSES_FailureNode'
After debugging the issue we found out that the type of Cypher statement that is created depends upon the fact if the graph could contain cycles. After our latest change, the graph became cycle-free and the generated uses a different generator strategy that leads to above error. We have implemented a tiny change that would overcome the issue. In class
RelationshipDescription
of SDN, the method below must return different names depending on the direction of the relationship:I have created a branch in my fork of SDN that provides a test cases that covers that issue.
The text was updated successfully, but these errors were encountered: