-
selectOne和selectId 的搜索时建议使用First
源码里面使用的limit+find。使用find后,如果查不到数据,数据接收对象被实例化了一个空的对象;并且没有gorm.ErrRecordNotFound的错误了。
-
SqLite Error during build.
Tested on docker alpine 3.17, RHEL Linux 8 and Suse Linux 12.5
Cannot replicate in playground as it fails in build.
> [builder 7/7] RUN go build -o main: …
-
## Describe the feature
希望支持 指针表字段形式查询,无需再担心表字段 写错或重命名
例如 query.Where(&person.Id, 123).Where(&person.Name, "张三")
## Motivation
参考:https://github.com/acmestack/gorm-plus
参考:https://githu…
-
什么时候才有根据数据库生成实体类 CRUD功能 ,还有分页功能和事务什么时候有呀 期待你的更新,忘回复
-
**Enviornment (please complete the following information):**
- OS: [Linux: uname -a]
- envcd version [e.g. v0.0.1]
**Describe the bug**
A clear and concise description of what the bug is.
**T…
-
您好,复刻了一份您的代码,用于自己自定义的修改。
修改了结构和表名
保留了原来出处
-
新特性里面增加了字段忽略和条件查询的功能,里面用到的字段反射都是基于一层结构体的,建议改为下面的模式适配测试代码
type Base struct {
ID int64
CreatedAt time.Time
UpdatedAt time.Time
}
type User struct {
Base
Username string
Pass…
-
## Proposal: A built-in Go error check function, `try`
**This proposal has been [closed](https://github.com/golang/go/issues/32437#issuecomment-512035919). Thanks, everybody, for your input.**
B…
-
can ColumnNameMap cached for same Entity? Do not call buildColumnNameMap every time.
-
## Your Question
I'd like to select something when using `Smart Select Fields` for example, `Location` table is
```go
type Location struct {
gorm.Model
Name string `gorm:"not null"`…