Faker Doesn't Know Your Entities Are Related, So I Built Something That Does
Description and use
SynthForge automatically generates data for JPA entities, respecting relationships and constraints, eliminating the need for manual seed scripts.
Problem
Spring Boot developers struggle to seed relational data with Faker because it ignores entity relationships, leading to unique constraint violations and fragile seed scripts.
Outcome
Automated, idempotent data seeding that respects entity relationships and constraints, reducing debugging time and improving developer productivity.
Workflow
- 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
Evidence
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.
- Record date: 2026-09-14T19:00:49.169Z