Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestManyToManyPreloadForNestedPointer (0.28 sec)

  1. tests/preload_suits_test.go

    	}
    
    	if err := DB.Preload("Level1s").Find(&got4, "value IN (?)", []string{"non-existing"}).Error; err != nil {
    		t.Error(err)
    	}
    }
    
    func TestManyToManyPreloadForNestedPointer(t *testing.T) {
    	type (
    		Level1 struct {
    			ID    uint
    			Value string
    		}
    		Level2 struct {
    			ID      uint
    			Value   string
    			Level1s []*Level1 `gorm:"many2many:levels;"`
    		}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Mar 18 05:38:46 UTC 2022
    - 30.3K bytes
    - Viewed (0)
Back to top