micronaut-projects / micronaut-projects/micronaut-data
Support CUID as @AutoPopulated @Id
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 482
- Forks
- 229
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 32
Description
Feature description
Today UUID is supported by Micronaut Data as auto generated primary keys. It would be great to also have support for CUIDs.
"CUID is a more modern approach to generating unique identifiers, designed to be more collision-resistant than UUIDs. CUIDs are shorter, making them more efficient to use in databases and easier to handle in URLs. They are also sequential to a degree, which can help with database indexing performance."
There is no CUID2 implementation i Java SDK so Micronaut would have to supply its own.
https://www.codu.co/articles/integers-uuid-guid-cuid-and-nanoid-explained-z_1mombc
https://dev.to/turck/comparing-uuid-cuid-and-nanoid-a-developers-guide-50c
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing existing UUID handling for @AutoPopulated @Id and checking the Java SDK's identifier-generation APIs. Confirm the CUID representation and generation semantics, then add focused coverage showing CUID primary keys are generated and persisted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100