Fix gorm:"-" When the query is not working to issues 2048
Fix https://github.com/jinzhu/gorm/issues/2048
This commit is contained in:
parent
32455088f2
commit
2515ff8e25
3
scope.go
3
scope.go
@ -112,6 +112,9 @@ func (scope *Scope) Fields() []*Field {
|
|||||||
)
|
)
|
||||||
|
|
||||||
for _, structField := range scope.GetModelStruct().StructFields {
|
for _, structField := range scope.GetModelStruct().StructFields {
|
||||||
|
if structField.IsIgnored {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if isStruct {
|
if isStruct {
|
||||||
fieldValue := indirectScopeValue
|
fieldValue := indirectScopeValue
|
||||||
for _, name := range structField.Names {
|
for _, name := range structField.Names {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user