Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ModelType (0.06 sec)

  1. clause/expression.go

    				reflectValue = reflect.Indirect(reflectValue)
    				switch reflectValue.Kind() {
    				case reflect.Struct:
    					modelType := reflectValue.Type()
    					for i := 0; i < modelType.NumField(); i++ {
    						if fieldStruct := modelType.Field(i); ast.IsExported(fieldStruct.Name) {
    							namedMap[fieldStruct.Name] = reflectValue.Field(i).Interface()
    
    							if fieldStruct.Anonymous {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Oct 10 06:45:48 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  2. callbacks/delete.go

    				continue
    			}
    
    			switch rel.Type {
    			case schema.HasOne, schema.HasMany:
    				queryConds := rel.ToQueryConditions(db.Statement.Context, db.Statement.ReflectValue)
    				modelValue := reflect.New(rel.FieldSchema.ModelType).Interface()
    				tx := db.Session(&gorm.Session{NewDB: true}).Model(modelValue)
    				withoutConditions := false
    				if db.Statement.Unscoped {
    					tx = tx.Unscoped()
    				}
    
    				if len(db.Statement.Selects) > 0 {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Sun May 25 07:40:40 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  3. schema/utils.go

    	for _, rel := range rels {
    		reflectResults = reflect.MakeSlice(reflect.SliceOf(reflect.PointerTo(rel.FieldSchema.ModelType)), 0, 1)
    
    		appendToResults := func(value reflect.Value) {
    			if _, isZero := rel.Field.ValueOf(ctx, value); !isZero {
    				result := reflect.Indirect(rel.Field.ReflectValueOf(ctx, value))
    				switch result.Kind() {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Feb 13 06:16:26 UTC 2025
    - 5.5K bytes
    - Viewed (0)
Back to top