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

Pluggable ID generation strategy [DATAMONGO-918]

Open
#1,842 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Ryan Tenney opened DATAMONGO-918 and commented

I'm starting to use Twitter's Snowflake ID generation service to generate ids for entities (one of the systems with which my project is integrating requires a 64-bit long ID and we want to have only one primary id per object). To do this I'm generating the ID in the services which wrap our repositories. Is there any way to specify an object instance to use for generating an id? If not, would you consider adding one? I'd be happy to help with implementing the feature.

Many thanks,
Ryan


No further details from DATAMONGO-918

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

The issue does not name any files, tests, or entry points. Start by locating how Spring Data MongoDB currently generates identifiers for persisted entities, then determine the API and lifecycle changes needed for a pluggable strategy. Done means a supported way to use an externally generated 64-bit ID, with behavior and tests defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mongodb, 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.