Skip to content

Commit

Permalink
Fix has_one example references value (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
feiju12138 authored Jul 12, 2024
1 parent b2f8210 commit 42acd5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/docs/has_one.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}

type CreditCard struct {
Expand Down

0 comments on commit 42acd5e

Please sign in to comment.