spring-projects / spring-projects/spring-data-relational

Optimized writing behavior [DATAJDBC-533]

Open
#753 0 comments 0 reactions 1 assignee View on GitHub

@schauder is already working on this.

Since Dec 31, 2020.

type: enhancement
Dominant language
Java
Stars
827
Forks
394
PR merge metrics
No merged PRs in 30d

Description

Jens Schauder opened DATAJDBC-533 and commented

Since Spring Data JDBC does not maintain any relationship between loaded and saved entities we always have to write everything.

This issue should explore ways to optimise this behavior.

  1. boolean attribute annotated with isChanged could mark a complete entity as unchanged (including all referenced entities).

  2. Wrappers for collections could contain offer a similar attribute to communicate something similar.
    a) denoting nothing was added/removed from the collection
    b) denoting nothing was added/removed from the collection nor did the elements themselve change
    c) giving separate information about if something/what was added/removed

  3. Alternatively the same information could be made available in a companion object, denoting those parts of the aggregate that need saving.

  4. We could execute a full script instead of single statements, cutting down on the number of round trips.


No further details from DATAJDBC-533

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.