Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for fromfile (0.08 sec)

  1. tests/associations_test.go

    	member := Member{Refer: 1, Name: "foreign_key_constraints", Profile: Profile{Name: "my_profile"}}
    
    	DB.Create(&member)
    
    	var profile Profile
    	if err := DB.First(&profile, "id = ?", member.Profile.ID).Error; err != nil {
    		t.Fatalf("failed to find profile, got error: %v", err)
    	} else if profile.MemberID != member.ID {
    		t.Fatalf("member id is not equal: expects: %v, got: %v", member.ID, profile.MemberID)
    	}
    
    	member.Profile = Profile{}
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Feb 08 08:29:09 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  2. schema/index_test.go

    			Name:    "idx_user_indices_name5",
    			Class:   "FULLTEXT",
    			Comment: "hello , world",
    			Where:   "age > 10",
    			Fields:  []schema.IndexOption{{Field: &schema.Field{Name: "Name5"}}},
    		},
    		"profile": {
    			Name:    "profile",
    			Comment: "hello , world",
    			Where:   "age > 10",
    			Option:  "WITH PARSER parser_name",
    			Fields: []schema.IndexOption{{Field: &schema.Field{Name: "Name6"}}, {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sun Feb 04 07:49:19 UTC 2024
    - 8K bytes
    - Viewed (0)
  3. schema/relationship_test.go

    func TestBelongsToOverrideForeignKey(t *testing.T) {
    	type Profile struct {
    		gorm.Model
    		Name string
    	}
    
    	type User struct {
    		gorm.Model
    		Profile      Profile `gorm:"ForeignKey:ProfileRefer"`
    		ProfileRefer int
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Profile", Type: schema.BelongsTo, Schema: "User", FieldSchema: "Profile",
    		References: []Reference{{"ID", "Profile", "ProfileRefer", "User", "", false}},
    	})
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 25.5K bytes
    - Viewed (0)
Back to top