Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for many2many_omit_associations (0.22 sec)

  1. tests/associations_many2many_test.go

    	}
    
    	AssertAssociationCount(t, user2, "Languages", 0, "after clear")
    }
    
    func TestMany2ManyOmitAssociations(t *testing.T) {
    	tidbSkip(t, "not support the foreign key feature")
    
    	user := *GetUser("many2many_omit_associations", Config{Languages: 2})
    
    	if err := DB.Omit("Languages.*").Create(&user).Error; err == nil {
    		t.Fatalf("should raise error when create users without languages reference")
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 13.2K bytes
    - Viewed (0)
Back to top