mirror of
https://github.com/landsman/typeid-hibernate.git
synced 2026-11-08 16:15:49 +01:00
Custom ID generator for Hibernate, Spring Framework inspired by @stripe
- Java 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| .idea | ||
| .junie | ||
| gradle/wrapper | ||
| src | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| settings.gradle.kts | ||
typeid-hibernate
Hibernate implementation of TypeID.
TypeIDs are a modern, type-safe, globally unique identifier based on the upcoming UUIDv7 standard. They provide a ton of nice properties that make them a great choice as the primary identifiers for your data in a database, APIs, and distributed systems. Read more about TypeIDs in their spec.
Installation
Starting with version 0.0.1, typeid-hibernate requires at least Java 17.
For installation via Gradle:
repositories {
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/landsman/typeid-hibernate")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
implementation("com.github.landsman:typeid-hibernate:0.0.1")
}
Usage
public class TestUserEntity {
@Id
@TypeIdHibernate(prefix = "u")
private String id;
}