Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for created_by (0.16 sec)

  1. schema/relationship_test.go

    	type User struct {
    		ID        int32 `gorm:"primaryKey"`
    		Name      string
    		CreatedBy *int32
    		Creator   *User `gorm:"foreignKey:CreatedBy;references:ID"`
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Creator", Type: schema.BelongsTo, Schema: "User", FieldSchema: "User",
    		References: []Reference{{"ID", "User", "CreatedBy", "User", "", false}},
    	})
    }
    
    func TestBelongsToWithMixin(t *testing.T) {
    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