Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for UserRefer (0.14 sec)

  1. schema/relationship_test.go

    	type Profile struct {
    		gorm.Model
    		Name      string
    		UserRefer uint
    	}
    
    	type User struct {
    		gorm.Model
    		UserRefer uint
    		Profile   []Profile `gorm:"ForeignKey:UserRefer"`
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Profile", Type: schema.HasMany, Schema: "User", FieldSchema: "Profile",
    		References: []Reference{{"ID", "User", "UserRefer", "Profile", "", true}},
    	})
    }
    
    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