Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 44 of 44 for street (0.17 sec)

  1. callbacks/helper.go

    	switch v.Kind() {
    	case reflect.Slice, reflect.Array:
    		loaded = true
    		for i := 0; i < v.Len(); i++ {
    			if !loadOrStoreVisitMap(visitMap, v.Index(i)) {
    				loaded = false
    			}
    		}
    	case reflect.Struct, reflect.Interface:
    		if v.CanAddr() {
    			p := v.Addr()
    			if _, ok := (*visitMap)[p]; ok {
    				return true
    			}
    			(*visitMap)[p] = true
    		}
    	}
    
    	return
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 14 12:32:57 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  2. tests/named_polymorphic_test.go

    package tests_test
    
    import (
    	"testing"
    
    	. "gorm.io/gorm/utils/tests"
    )
    
    type Hamster struct {
    	Id           int
    	Name         string
    	PreferredToy Toy `gorm:"polymorphic:Owner;polymorphicValue:hamster_preferred"`
    	OtherToy     Toy `gorm:"polymorphic:Owner;polymorphicValue:hamster_other"`
    }
    
    func TestNamedPolymorphic(t *testing.T) {
    	DB.Migrator().DropTable(&Hamster{})
    	DB.AutoMigrate(&Hamster{})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jul 08 09:59:40 GMT 2020
    - 4.2K bytes
    - Viewed (0)
  3. schema/field_test.go

    			t.Errorf("no error should happen when assign value to field %v, but got %v", k, err)
    		}
    	}
    	checkField(t, userSchema, reflectValue, newValues2)
    }
    
    type UserWithPermissionControl struct {
    	ID    uint
    	Name  string `gorm:"-"`
    	Name2 string `gorm:"->"`
    	Name3 string `gorm:"<-"`
    	Name4 string `gorm:"<-:create"`
    	Name5 string `gorm:"<-:update"`
    	Name6 string `gorm:"<-:create,update"`
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 19 09:02:53 GMT 2022
    - 12.7K bytes
    - Viewed (0)
  4. tests/delete_test.go

    		t.Errorf("should returns record not found error, but got %v", err)
    	}
    }
    
    func TestDeleteWithTable(t *testing.T) {
    	type UserWithDelete struct {
    		gorm.Model
    		Name string
    	}
    
    	DB.Table("deleted_users").Migrator().DropTable(UserWithDelete{})
    	DB.Table("deleted_users").AutoMigrate(UserWithDelete{})
    
    	user := UserWithDelete{Name: "delete1"}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 07:03:34 GMT 2023
    - 9.4K bytes
    - Viewed (0)
Back to top