-
Notifications
You must be signed in to change notification settings - Fork 616
Don't overwrite unknown properties of known nodes and relationships. #2118
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
michael-simons
added a commit
that referenced
this issue
Jan 21, 2021
…ionships. This commit fixes the behaviour of overwrwiting unknown properties of nodes and relationships: Instead of using the SET operation we must use MUTATE, effectivly creating a `n += properties` instead of `n = properties` assignment. The change requires an updated version of the Cypher-DSL. Furthermore, it requires a change by users: We offered the possibility to use `@RelationshipProperties` without the need for a field storing the internal id. The id however _is_ needed to check whether a relationship already exist or not. While this is irrelevant for relationships without properties, it is very much relevant for the ones having properties. We log a warning now about the fact. That will be a hard requirement for 6.1. To make this work, the verification of the presence of an id property needed to be reworked. It id property is now stored in a thread safe lazy as well and assigned during the creation of a persistent entity. Some minor improvements have been added as well: * We don't pass the literal value for the target id when saving new relationships * We avoid some parameters in the Cypher generator * We optimized a condition in the converter so that it leaves evaluating retrieved values early This closes #2118.
michael-simons
added a commit
that referenced
this issue
Jan 25, 2021
…ionships. This commit fixes the behaviour of overwrwiting unknown properties of nodes and relationships: Instead of using the SET operation we must use MUTATE, effectivly creating a `n += properties` instead of `n = properties` assignment. The change requires an updated version of the Cypher-DSL. Furthermore, it requires a change by users: We offered the possibility to use `@RelationshipProperties` without the need for a field storing the internal id. The id however _is_ needed to check whether a relationship already exist or not. While this is irrelevant for relationships without properties, it is very much relevant for the ones having properties. We log a warning now about the fact. That will be a hard requirement for 6.1. To make this work, the verification of the presence of an id property needed to be reworked. It id property is now stored in a thread safe lazy as well and assigned during the creation of a persistent entity. Some minor improvements have been added as well: * We don't pass the literal value for the target id when saving new relationships * We avoid some parameters in the Cypher generator * We optimized a condition in the converter so that it leaves evaluating retrieved values early This closes #2118 and requires Cypher-DSL 2020.1.6.
michael-simons
added a commit
that referenced
this issue
Jan 25, 2021
…ionships. This commit fixes the behaviour of overwrwiting unknown properties of nodes and relationships: Instead of using the SET operation we must use MUTATE, effectivly creating a `n += properties` instead of `n = properties` assignment. The change requires an updated version of the Cypher-DSL. Furthermore, it requires a change by users: We offered the possibility to use `@RelationshipProperties` without the need for a field storing the internal id. The id however _is_ needed to check whether a relationship already exist or not. While this is irrelevant for relationships without properties, it is very much relevant for the ones having properties. We log a warning now about the fact. That will be a hard requirement for 6.1. To make this work, the verification of the presence of an id property needed to be reworked. It id property is now stored in a thread safe lazy as well and assigned during the creation of a persistent entity. Some minor improvements have been added as well: * We don't pass the literal value for the target id when saving new relationships * We avoid some parameters in the Cypher generator * We optimized a condition in the converter so that it leaves evaluating retrieved values early This closes #2118 and requires Cypher-DSL 2020.1.6.
michael-simons
added a commit
that referenced
this issue
Jan 25, 2021
This removes the logged warning and replaces it with an IllegalStateException. Removes the depreciations, updates the manual and additional tests that have been added in 6.1.x.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
No description provided.
The text was updated successfully, but these errors were encountered: