Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for UserAux (0.19 sec)

  1. schema/relationship_test.go

    func TestSameForeignKey(t *testing.T) {
    	type UserAux struct {
    		gorm.Model
    		Aux  string
    		UUID string
    	}
    
    	type User struct {
    		gorm.Model
    		Name string
    		UUID string
    		Aux  *UserAux `gorm:"foreignkey:UUID;references:UUID"`
    	}
    
    	checkStructRelation(t, &User{},
    		Relation{
    			Name: "Aux", Type: schema.HasOne, Schema: "User", FieldSchema: "UserAux",
    			References: []Reference{
    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