Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. schema/relationship_test.go

    		UserRefer uint
    	}
    
    	type User struct {
    		gorm.Model
    		Profile Profile `gorm:"ForeignKey:UserRefer"`
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Profile", Type: schema.HasOne, Schema: "User", FieldSchema: "Profile",
    		References: []Reference{{"ID", "User", "UserRefer", "Profile", "", true}},
    	})
    }
    
    func TestHasOneOverrideReferences(t *testing.T) {
    	type Profile struct {
    		gorm.Model
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
Back to top