go-gorm /gorm

The fantastic ORM library for Golang, aims to be developer friendly

★ 39,989⑂ 4,300👁 486⑃ 1,586● 6,153▤ 12◈ 115
GoMITCreated 2013-10-25gorm.io
39,989
stars
+2
4,300
forks
486
watchers
1,586
prs
6,153
issues
12
releases
115
discussions

README

GORM

The fantastic ORM library for Golang, aims to be developer friendly.






 Overview

 Full-Featured ORM
 Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism, Single-table inheritance)
 Hooks (Before/After Create/Save/Update/Delete/Find)
 Eager loading with Preload, Joins
 Transactions, Nested Transactions, Save Point, RollbackTo to Saved Point
 Context, Prepared Statement Mode, DryRun Mode
 Batch Insert, FindInBatches, Find To Map
 SQL Builder, Upsert, Locking, Optimizer/Index/Comment Hints, NamedArg, Search/Update/Create with SQL Expr
 Composite Primary Key
 Auto Migrations
 Logger
 Extendable, flexible plugin API: Database Resolver (Multiple Databases, Read/Write Splitting) / Prometheus…
 Every feature comes with tests
 Developer Friendly

 Getting Started

 GORM Guides https://gorm.io
 Gen Guides https://gorm.io/gen/index.html

 Contributing

You can help to deliver a better GORM, check out things you can do

 Contributors

Thank you for contributing to the GORM framework!

 License

© Jinzhu, 2013~time.Now

Released under the MIT License

Top issues

Discussions

Latest release

Release v1.31.2 v1.31.2 2026-06-25
Changes

- Fix potential rows leak on panic by deferring rows.Close() @omer-cengel (7798)
- perf: replace fmt.Sprintf with strconv in ExplainSQL numeric formatting @alpardfm (7796)
- Document NowFunc timezone behavior @morning-verlu (7799)
- correct typo and rename fileType to fieldType in AlterColumn @cragone (7748)
- fix: panic when using clause.Returning with CreateInBatches @Truongquangkhang (7768)
- fix(migrator): add nil guards to ColumnType methods to prevent panic @lihan3238 (7767)
- ci: switch tests Go matrix to stable/oldstable and update setup-go @smf-h (7726)
- chore(ci): bump acti

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON