Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ProfileRefer (0.05 sec)

  1. schema/relationship_test.go

    		gorm.Model
    		Name         string
    		ProfileRefer int // not used in relationship
    	}
    
    	type User struct {
    		gorm.Model
    		Profile      Profile `gorm:"ForeignKey:ID;references:ProfileRefer"`
    		ProfileRefer int
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Profile", Type: schema.HasOne, Schema: "User", FieldSchema: "Profile",
    		References: []Reference{{"ProfileRefer", "User", "ID", "Profile", "", true}},
    	})
    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