Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ProfileID (0.21 sec)

  1. schema/relationship_test.go

    	}
    
    	type User struct {
    		gorm.Model
    		Profile   Profile `gorm:"ForeignKey:ProfileID;References:Refer"`
    		ProfileID int
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Profile", Type: schema.BelongsTo, Schema: "User", FieldSchema: "Profile",
    		References: []Reference{{"Refer", "Profile", "ProfileID", "User", "", false}},
    	})
    }
    
    func TestBelongsToWithOnlyReferences(t *testing.T) {
    	type Profile struct {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Aug 18 11:44:52 UTC 2025
    - 26.5K bytes
    - Viewed (0)
Back to top