- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for PersonID (0.12 sec)
-
tests/scan_test.go
address1 := Address{Name: "address 1"} address2 := Address{Name: "address 2"} DB.Save(&address1).Save(&address2) DB.Create(&PersonAddress{PersonID: person1.ID, AddressID: int(address1.ID)}) DB.Create(&PersonAddress{PersonID: person1.ID, AddressID: int(address2.ID)}) DB.Create(&PersonAddress{PersonID: person2.ID, AddressID: int(address1.ID)}) var personAddressInfoList []*PersonAddressInfo if err := DB.Select("people.*, addresses.*").
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10.9K bytes - Viewed (0) -
tests/joins_table_test.go
ID int Name string Addresses []Address `gorm:"many2many:person_addresses;"` DeletedAt gorm.DeletedAt } type Address struct { ID uint Name string } type PersonAddress struct { PersonID int AddressID int CreatedAt time.Time DeletedAt gorm.DeletedAt } func TestOverrideJoinTable(t *testing.T) { DB.Migrator().DropTable(&Person{}, &Address{}, &PersonAddress{})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Sep 10 13:46:18 UTC 2020 - 3.5K bytes - Viewed (0) -
schema/relationship_test.go
References: []Reference{ {"ID", "Person", "PersonID", "likes", "", true}, {"ID", "Thing", "ThingID", "likes", "", false}, }, }, Relation{ Name: "Dislikes", Type: schema.Many2Many, Schema: "Person", FieldSchema: "Thing", JoinTable: JoinTable{Name: "dislikes", Table: "dislikes"}, References: []Reference{ {"ID", "Person", "PersonID", "dislikes", "", true},
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 25.5K bytes - Viewed (0)