File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,10 @@ import (
44
44
. "github.com/oracle-samples/gorm-oracle/tests/utils"
45
45
46
46
"gorm.io/gorm"
47
+ "gorm.io/gorm/clause"
47
48
)
48
49
49
50
func TestUpdateHasManyAssociations (t * testing.T ) {
50
- t .Skip ()
51
51
user := * GetUser ("update-has-many" , Config {})
52
52
53
53
if err := DB .Create (& user ).Error ; err != nil {
@@ -67,7 +67,7 @@ func TestUpdateHasManyAssociations(t *testing.T) {
67
67
pet .Name += "new"
68
68
}
69
69
70
- if err := DB .Save (& user ).Error ; err != nil {
70
+ if err := DB .Omit ( clause . Associations ). Save (& user ).Error ; err != nil {
71
71
t .Fatalf ("errors happened when update: %v" , err )
72
72
}
73
73
@@ -103,7 +103,7 @@ func TestUpdateHasManyAssociations(t *testing.T) {
103
103
user .Toys [idx ].Name += "new"
104
104
}
105
105
106
- if err := DB .Save (& user ).Error ; err != nil {
106
+ if err := DB .Omit ( clause . Associations ). Save (& user ).Error ; err != nil {
107
107
t .Fatalf ("errors happened when update: %v" , err )
108
108
}
109
109
You can’t perform that action at this time.
0 commit comments