Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for create_from_map_with_schema12 (0.12 sec)

  1. tests/create_test.go

    	if int64(result2.ID) != idVal {
    		t.Fatal("failed to create data from map with table, @id != id")
    	}
    
    	// case 3: records
    	values := []map[string]interface{}{
    		{"name": "create_from_map_with_schema11", "age": 1}, {"name": "create_from_map_with_schema12", "age": 1},
    	}
    
    	beforeLen := len(values)
    	if err := DB.Model(&User{}).Create(&values).Error; err != nil {
    		t.Fatalf("failed to create data from map, got error: %v", err)
    	}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 26.4K bytes
    - Viewed (0)
Back to top