spring-projects / spring-projects/spring-data-mongodb

Extend support around the Extended Reference Pattern via DocumentReferences.

Open
#4,801 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
1.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Explore if it makes sense to have a different extraction pattern for storing the relation than for the retrieval. Doing so would allow users to build dedicated views on the data for reading operations that require less data and must not resolve the reference.

class Payment {

    String id;

    @DocumentReference(fields = { "id", "name", "birthdate" }, lookup="{ '_id' : ?#{#target.id} }")
    Customer sender;

    PaymentReceiver receiver;

    // ...
}

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 reviewing the existing DocumentReference support and the Extended Reference Pattern described in the issue. Compare how relation data is stored with how it is retrieved, including the Payment and Customer example. Done would require a decided design for separate extraction and retrieval patterns, along with agreed implementation and test scope.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.