Loading…
0+ curated questions with the same answer shape every time: quick recap, deep dive, pitfalls, and follow-ups. Coverage includes .
GORM is the most popular ORM in the Go ecosystem, and Ent is the code-generation-based alternative gaining traction at larger companies. This module covers GORM's model conventions (gorm.Model with ID/CreatedAt/UpdatedAt/DeletedAt, soft deletes, naming conventions), association types (BelongsTo, HasMany, ManyToMany), the N+1 problem and how Preload and Joins fix it differently, GORM hooks (BeforeCreate, AfterUpdate — the trade-off between convenience and hidden behaviour), AutoMigrate vs manual migrations with goose or golang-migrate, and using db.Raw and db.Exec for queries GORM cannot express. Ent is covered from the design decision angle: schema-as-code with full type safety and codegen vs GORM's convention-over-configuration approach. The critical interview question is 'when would you drop to raw SQL instead of using an ORM?' — this module gives the honest answer.
Full catalog
Topics are ordered for learning. Within each topic, rows are numbered 1–0 globally so you always know where you are. Collapse topics if you want a lighter view — use Expand all when you need the full list again.
Numbers 1–0 follow the order we recommend — click any row to open the full answer, or use the sticky Next link at the bottom of each page to go Q1 → Q0.