Skip to content
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

Don't overwrite unknown properties of known nodes and relationships. #2118

Closed
michael-simons opened this issue Jan 18, 2021 · 0 comments
Closed
Assignees
Labels
type: bug A general bug

Comments

@michael-simons
Copy link
Collaborator

No description provided.

@michael-simons michael-simons added the type: bug A general bug label Jan 18, 2021
@michael-simons michael-simons added this to the 6.0.4 (2020.0.4) milestone Jan 18, 2021
@michael-simons michael-simons self-assigned this Jan 18, 2021
@michael-simons michael-simons changed the title Unknown properties must not be overwritten. Don't overwrite unknown properties of known nodes and relationships. Jan 21, 2021
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.
michael-simons added a commit that referenced this issue Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant