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

Storing non root entities in serialized form [DATAJDBC-450]

Open
#673 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bahadır Yağan opened DATAJDBC-450 and commented

It may be a good feature to optionally store non-root entities in a single column in the aggregate root's table, rather than separate table(s)

Object tree will be serialized (possibly as json) and stored in a single text column. The user than has the option of using their DBMS' support for such columns. (jsonb or hstore for postgres is an example)

My somewhat related SO question:

https://stackoverflow.com/questions/58910098/mapstring-string-single-column-mapping-in-spring-data-jdbc

 

 


Issue Links:

  • DATAJDBC-476 BasicRelationalConverter.writeValue(…) assumes eager entity conversion

  • DATACMNS-1036 Add API for property specific converters

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.

Research direction

Start by reading the related DATAJDBC-476 and DATACMNS-1036 issues, then trace the Spring Data JDBC conversion and property-converter entry points they identify. The desired outcome is an optional mapping that stores non-root entities as serialized data in one aggregate-root column, but the issue does not define the implementation scope or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.