- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for FirstOrCreate (0.14 sec)
-
tests/scanner_valuer_test.go
ExampleStruct: ExampleStruct{"name", "value1"}, ExampleStructPtr: &ExampleStruct{"name", "value2"}, } var result ScannerValuerStruct tx := DB.Where(data).FirstOrCreate(&result) if tx.RowsAffected != 1 { t.Errorf("RowsAffected should be 1 after create some record") } if tx.Error != nil { t.Errorf("Should not raise any error, but got %v", tx.Error) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Viewed (0)