Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Attributes (0.17 sec)

  1. chainable_api.go

    	if tx.Statement.Preloads == nil {
    		tx.Statement.Preloads = map[string][]interface{}{}
    	}
    	tx.Statement.Preloads[query] = args
    	return
    }
    
    // Attrs provide attributes used in [FirstOrCreate] or [FirstOrInit]
    //
    // Attrs only adds attributes if the record is not found.
    //
    //	// assign an email if the record is not found
    //	db.Where(User{Name: "non_existing"}).Attrs(User{Email: "******@****.***"}).FirstOrInit(&user)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
Back to top