Added working syntax to ignore field
Replaced non-working `gorm:"-"` syntax with `sql:"-"` to ignore a field in a struct
This commit is contained in:
parent
a2291efe5b
commit
3836f5441e
@ -21,7 +21,7 @@ type User struct {
|
||||
ShippingAddress Address // One-To-One relationship (belongs to - use ShippingAddressID as foreign key)
|
||||
ShippingAddressID int
|
||||
|
||||
IgnoreMe int `gorm:"-"` // Ignore this field
|
||||
IgnoreMe int `sql:"-"` // Ignore this field
|
||||
Languages []Language `gorm:"many2many:user_languages;"` // Many-To-Many relationship, 'user_languages' is join table
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user