Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for EmbeddedBindNames (0.23 sec)

  1. schema/relationship.go

    	} else {
    		schema.Relationships.Relations[relation.Name] = relation
    	}
    
    	// set embedded relation
    	if len(relation.Field.EmbeddedBindNames) <= 1 {
    		return
    	}
    	relationships := &schema.Relationships
    	for i, name := range relation.Field.EmbeddedBindNames {
    		if i < len(relation.Field.EmbeddedBindNames)-1 {
    			if relationships.EmbeddedRelations == nil {
    				relationships.EmbeddedRelations = map[string]*Relationships{}
    			}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  2. schema/field.go

    				ef.BindNames = append([]string{fieldStruct.Name}, ef.BindNames...)
    				if _, ok := field.TagSettings["EMBEDDED"]; ok || !fieldStruct.Anonymous {
    					ef.EmbeddedBindNames = append([]string{fieldStruct.Name}, ef.EmbeddedBindNames...)
    				}
    				// index is negative means is pointer
    				if field.FieldType.Kind() == reflect.Struct {
    					ef.StructField.Index = append([]int{fieldStruct.Index[0]}, ef.StructField.Index...)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  3. callbacks/preload.go

    	for _, relation := range embeddedRelations.Relations {
    		// skip first struct name
    		names = append(names, strings.Join(relation.Field.EmbeddedBindNames[1:], "."))
    	}
    	for _, relations := range embeddedRelations.EmbeddedRelations {
    		names = append(names, embeddedValues(relations)...)
    	}
    	return names
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
Back to top