Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestBelongsToWithOnlyReferences (0.13 sec)

  1. schema/relationship_test.go

    		Name: "Profile", Type: schema.BelongsTo, Schema: "User", FieldSchema: "Profile",
    		References: []Reference{{"Refer", "Profile", "ProfileID", "User", "", false}},
    	})
    }
    
    func TestBelongsToWithOnlyReferences(t *testing.T) {
    	type Profile struct {
    		gorm.Model
    		Refer string
    		Name  string
    	}
    
    	type User struct {
    		gorm.Model
    		Profile      Profile `gorm:"References:Refer"`
    		ProfileRefer int
    	}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 25.5K bytes
    - Viewed (0)
Back to top