Faker Doesn't Know Your Entities Are Related, So I Built Something That Does
说明与用途
SynthForge 自动为 JPA 实体生成数据,考虑关系和约束,消除手动 seed 脚本的需求。
问题
Spring Boot developers struggle to seed relational data with Faker because it ignores entity relationships, leading to unique constraint violations and fragile seed scripts.
结果
Automated, idempotent data seeding that respects entity relationships and constraints, reducing debugging time and improving developer productivity.
工作流
- Annotate entities with @Seed(count=…)
- Add JPA relationship annotations (@ManyToOne, @NotNull, @Column(unique=true))
- Add SynthForge dependency to Maven
- Enable SynthForge profile on startup
- Run the application – tables populate automatically
证据
Start the app in a dev profile. Both tables populate, correctly ordered, on every restart.
From the owning-side @ManyToOne/@OneToOne relationships, it builds a dependency graph and topologically sorts it.
- 记录日期: 2026-09-14T19:00:49.169Z