- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for labels (0.13 sec)
-
tests/joins_test.go
if db5.Error != nil { t.Errorf("Should not raise error for join where identical fields in different tables. Error: %s", db5.Error.Error()) } var users6 []User DB.Joins("inner join pets on pets.user_id = users.id AND pets.name = @Name", user.Pets[0]).Where("users.name = ?", user.Name).First(&users6) if len(users6) != 1 {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Apr 26 14:19:32 GMT 2023 - 13.5K bytes - Viewed (1) -
tests/multi_primary_keys_test.go
} } func TestCompositePrimaryKeysAssociations(t *testing.T) { type Label struct { BookID *uint `gorm:"primarykey"` Name string `gorm:"primarykey"` Value string } type Book struct { ID int Name string Labels []Label } DB.Migrator().DropTable(&Label{}, &Book{}) if err := DB.AutoMigrate(&Label{}, &Book{}); err != nil { t.Fatalf("failed to migrate, got %v", err) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 12.8K bytes - Viewed (0)