- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for checkEmbeddedRelations (0.17 sec)
-
schema/relationship_test.go
Toys []Toy `gorm:"polymorphic:Owner;"` } s, err := schema.Parse(&User{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Fatalf("Failed to parse schema, got error %v", err) } checkEmbeddedRelations(t, s.Relationships.EmbeddedRelations, map[string]EmbeddedRelations{ "Cat": { Relations: map[string]Relation{ "Toy": { Name: "Toy", Type: schema.HasOne,
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 25.5K bytes - Viewed (0) -
schema/schema_helper_test.go
Relations map[string]Relation EmbeddedRelations map[string]EmbeddedRelations } func checkEmbeddedRelations(t *testing.T, actual map[string]*schema.Relationships, expected map[string]EmbeddedRelations) { for name, relations := range actual { rs := expected[name] t.Run("CheckEmbeddedRelations/"+name, func(t *testing.T) { if len(relations.Relations) != len(rs.Relations) {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Dec 15 08:31:23 UTC 2023 - 7.5K bytes - Viewed (0)