-
Notifications
You must be signed in to change notification settings - Fork 618
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
toString id clashes with parameters of type Long (SDN 7.1.3/7.1.4) #2872
Comments
Hej, thanks for the detailed report. |
Of course, going through the SDN code I can see you check for those possibleCircles, that's why in my code the issue applies only to a subset of entities. I can share one of the simpler ones. Please see the screenshots attached. This entity is part of a linked list cause it has a relationship to previous of the same type. My logic prevents pointing at the very same object (node), it's just a linked list of objects of the same type so we keep a relationship to the previous one. Feels like it's ok to have an entity with possibleCircles. The reason is why only in this case we compare stringified ids with Long params for methods like findAll, findById and so on. |
Can I see your |
I cannot reproduce this, see linked PR. Make sure you configure the Cypher-DSL dialect, pls https://docs.spring.io/spring-data/neo4j/reference/getting-started.html#configure-cypher-dsl-dialect I tried both the main branch and the current 7.1.x branch. |
Thank you for your effort, let me see if I can provide simpliest (not)working runnable example. Let's leave this ticket hanging for a moment more please. |
Ofc, feel free to take my branch as a working base. |
Hey, apparently what solved my issue was downgrading cypherdsl to 2023.2.0 That's what is used in your branch Michael. There's no toString methods performed on entity nodeIds there. I think we can close this issue. Still I'll need to keep my eyes out next time when I need to step versions and cypherdsl. Maybe worth looking at from your side at one point ? Regards |
Hey, thanks for your detailed feedback so far. Thank!! |
No worries, feel free to contact me for more details if needed. Cheers. |
The issue is now unrelated to Spring Data Neo4j and points towards an rather old version of the CypherDSL. |
Hi, seems like I've found one bug which really blocks stepping of SDN in my project (springboot 3.1.3 -> 3.1.4):
There's been a change between SDN 7.1.3 and 7.1.4 which made method name derived queries return empty results for entities marked as containsPossibleCircles in Neo4jTemplate.
In Neo4jTemplate class, there's a TemplateSupport.convertToLongIdOrStringElementId(nodeIds) invocation which makes query params of type Long always NOT match with entity nodeIds. See screenshot attached. SDN logic somehow get's there only for entities for which containsPossibleCircles is set to true in Neo4jTemplate. My entities don't really contain circles in relationships but this probably does not matter. Repository methods like findAll or findById always give empty results for those cause SDN compares stringified ids with Long params. It works in SDN 7.1.3 and is broken in 7.1.4 and later
Regards !
The text was updated successfully, but these errors were encountered: