We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type ( Languages struct { ID uint `json:"id"` Name string `json:"name"` } User struct { ID uint `json:"id"` Name string `json:"name"` Languages []*Languages `json:"languages"` } ) user := &User{Name: "jinzhu", Languages: []*Languages{ {ID:1}, {ID:2}, }} db.Create(user) db.Session(&gorm.Session{FullSaveAssociations: false}).Create(user)
以上会多一句:
INSERT INTO `languages ` (`name`,`id`) VALUES ('',1),('',2) ON DUPLICATE KEY UPDATE `id`=`id`
不能跳过吗?
The text was updated successfully, but these errors were encountered:
omit the field
Sorry, something went wrong.
jinzhu
No branches or pull requests
Your Question
以上会多一句:
不能跳过吗?
The text was updated successfully, but these errors were encountered: