On this page
Overview
GORM is an ORM library for Go. It provides associations, hooks, eager loading, transactions, batch operations, a SQL builder, auto migration, logging, and a plugin API for model-oriented access to relational databases.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Build model-oriented CRUD with associations, preload, and hooks
Has One, Has Many, Belongs To, Many To Many, Preload/Joins eager loading, and lifecycle hooks can organize data access around application models.
Sources: [2]
Keep transactions, batches, SQL building, and auto migration in the same data layer
GORM supports nested transactions, savepoints, batch inserts, FindInBatches, named arguments, upsert, locking, SQL expressions, and Auto Migration for schema workflows.
Sources: [2]
Best fit
Fits Go backends with substantial CRUD and relationship-heavy data models
It is useful when business applications or APIs want common mapping, associations, transactions, and query composition while retaining an escape hatch to explicit SQL expressions.
Sources: [2]
Before adoption
v1.31.2 declares Go 1.18; regression-test migrations and connection lifecycle
The v1.31.2 go.mod declares Go 1.18. The release fixes row cleanup on panic, connection cleanup after failed ping, batch-create panics, and migrator edge cases, so upgrades should exercise transactions, connection leaks, migrations, and batch paths.
Official sources
- [1]go-gorm/gorm — GitHub repository(2026-10-06)
- [2]GORM v1.31.2 — README(2026-10-06)
- [3]GORM v1.31.2 — go.mod(2026-10-06)
- [4]GORM v1.31.2 release(2026-10-06)
- [5]GORM MIT license(2026-10-06)
Supplemental curator note
GORM covers CRUD, associations, transactions, and SQL building in one ORM. Treat Auto Migration as part of an explicit schema-change policy and review generated SQL and database-driver behavior before production rollouts.
Try it in 3 steps
- 1
Get the source
git clone --depth 1 https://github.com/go-gorm/gorm.git - 2
Enter the repository
cd gorm - 3
Check the official steps
Continue with the commands in the README Installation, Quick Start, or Getting Started section.
find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Growth
Growth trends · Last 30 days
39,982 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 1
- Open PRs
- 86
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- go
- golang
- orm
- web
- gorm
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- SQLAlchemy12,201 Stars
4 shared tag(s) · 2 shared category(s)
combine SQL expressions and ORM mapping in one Python data-access toolkit
Python - SeaORM9,914 Stars
4 shared tag(s) · 2 shared category(s)
manage asynchronous queries, relations, and migrations with a relational ORM for Rust
Rust - golang-migrate18,954 Stars
4 shared tag(s) · 1 shared category(s) · Same language
apply versioned migrations in order from a CLI or Go library across multiple databases
Go - goose11,544 Stars
4 shared tag(s) · 1 shared category(s) · Same language
run SQL and Go-function schema migrations from a CLI or library
Go - sqlc18,348 Stars
3 shared tag(s) · 2 shared category(s) · Same language
keep SQL as the source of truth and generate type-safe data-access code
Go - Entity Framework Core14,797 Stars
3 shared tag(s) · 2 shared category(s)
map .NET objects to databases with LINQ queries, change tracking, updates, schema migrations, and provider plugins
C#
Report incorrect information
Tell us if any listing information is incorrect or outdated.