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
go-gorm/playground#777
第二个First没有查询toys表
First
toys
func TestGORM(t *testing.T) { user := User{Name: "jinzhu", Age: 5} toy := Toy{Name: "jinzhu", OwnerID: "test"} DB.Create(&user) DB.Create(&toy) var result User DB = DB.Where("name = ?", "jinzhu") if err := DB.First(&result, "age = ?", 5).Error; err != nil { t.Errorf("Failed, got error: %v", err) } var ttoy Toy if err := DB.First(&ttoy, "owner_id = ?", "test").Error; err != nil { t.Errorf("Failed, got error: %v", err) } }
The text was updated successfully, but these errors were encountered:
https://gorm.io/docs/method_chaining.html
Sorry, something went wrong.
jinzhu
No branches or pull requests
GORM Playground Link
go-gorm/playground#777
Description
第二个
First
没有查询toys
表The text was updated successfully, but these errors were encountered: