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

Ensure embeddable single-column identifier references and embedded prefixes are considered properly

Open
#2,259 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Follow up to #2113. We should make sure that converters for custom ID types are applied correctly and that any prefixes for composite ID's are considered correctly, also for AggregateReference:

class Foo {

  @Id Long id;
  AggregateReference<Bar, BarId> assignedTo;
}

class Bar {

  @Id @Embedded.Nullable(prefix = "id_") BarId id;
}

class BarId {

  String a;
  String b;
}

and

class Foo {

  @Id Long id;
  @Embedded.Nullable(prefix = "assigned_to_") AggregateReference<Bar, BarId> assignedTo;
}

class Bar {

  @Id BarId id;
}

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 linked follow-up issue #2113 and tracing the existing converters for custom ID types, embedded prefixes, and AggregateReference handling. Use the two Java examples as regression cases; done means single-column custom IDs and composite IDs with prefixes are mapped correctly in both forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.