- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for HasManyCircularReference1 (0.11 sec)
-
tests/associations_test.go
parent := Parent{} DB.Create(&parent) child := Child{ParentID: &parent.ID, Parent: &parent, Name: "HasManyCircularReference"} child1 := Child{ParentID: &parent.ID, Parent: &parent, Name: "HasManyCircularReference1"} parent.Children = []*Child{&child, &child1} DB.Save(&parent) var children []*Child DB.Where("parent_id = ?", parent.ID).Find(&children) if len(children) != len(parent.Children) ||
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 08 08:29:09 UTC 2023 - 10.9K bytes - Viewed (0)