- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for checkEmbeddedRelations (0.56 sec)
-
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: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Aug 28 02:57:17 UTC 2025 - 7.5K bytes - Viewed (0) -
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: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Aug 18 11:44:52 UTC 2025 - 26.5K bytes - Viewed (0)