spring-projects / spring-projects/spring-data-cassandra

Loading empty collection-typed properties overwrites pre-initialized fields [DATACASS-266]

Open
#439 3 comments 1 reaction 1 assignee View on GitHub

@mp911de is already working on this.

Since Dec 31, 2020.

in: mapping type: bug
Dominant language
Java
Stars
400
Forks
318
PR merge metrics
No merged PRs in 30d

Description

Mark Paluch opened DATACASS-266 and commented

Cassandra list/set typed columns represent an empty collection as null. From here one can't tell whether the state was null or empty at the time saving the value. Loading this value causes MappingCassandraConverter to overwrite pre-initialized fields (e.g. with new ArrayList) with null.


Affects: 1.3.4 (Gosling SR4)

Reference URL: http://stackoverflow.com/questions/36349896/how-can-i-ensure-cassandraoperations-selectonebyid-initializes-all-fields-in-t

1 votes, 4 watchers

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.