13.1 Declarative Transactions Declarative Transactions The Transactional annotation vs the transactional property Custom Transaction Configuration Transaction status 13.1 D...
Overview Install Quick Start The fantastic ORM library for Golang aims to be developer friendly. Overview Full-Featured ORM Associations (Has One, Has Many, Belongs To, Many...
使用 ID 作为主键 复数表名 TableName 临时指定表名 命名策略 列名 时间戳追踪 CreatedAt UpdatedAt 使用 ID 作为主键 默认情况下,GORM 会使用 ID 作为表的主键。 type User struct { ID string // 默认情况下,名为 `ID` 的字...
Delete a Record Delete with primary key Delete Hooks Batch Delete Block Global Delete Returning Data From Deleted Rows Soft Delete Find soft deleted records Delete permanent...
Register Serializer Customized Serializer Type Serializer is an extensible interface that allows to customize how to serialize and deserialize data with databasae. GORM provide...