8000 set table not work with Find · Issue #3382 · go-gorm/gorm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
set table not work with Find #3382
Closed
Closed
@tiny1990

Description

@tiny1990

Description

type RecordInfo struct {
	Name     string
}
xx.DB.Table("record_info").Find(&recordInfo, &search)

wanted sql

select * from record_info where record_info.name = "a"

but terminal print

select * from record_info where record_infos.name = "a"

https://github.com/go-gorm/gorm/blob/master/schema/schema.go#L97
the Parse not use the tableName

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0