Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for many2many (0.07 sec)

  1. schema/relationship.go

    		schema.err = err
    		return nil
    	}
    
    	if hasPolymorphicRelation(field.TagSettings) {
    		schema.buildPolymorphicRelation(relation, field)
    	} else if many2many := field.TagSettings["MANY2MANY"]; many2many != "" {
    		schema.buildMany2ManyRelation(relation, field, many2many)
    	} else if belongsTo := field.TagSettings["BELONGSTO"]; belongsTo != "" {
    		schema.guessRelation(relation, field, guessBelongs)
    	} else {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  2. association.go

    				} else {
    					association.Error = tx.Where(clause.IN{Column: column, Values: values}).UpdateColumns(updateMap).Error
    				}
    			}
    		case schema.Many2Many:
    			var (
    				primaryFields, relPrimaryFields     []*schema.Field
    				joinPrimaryKeys, joinRelPrimaryKeys []string
    				modelValue                          = reflect.New(rel.JoinTable.ModelType).Interface()
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  3. callbacks/preload.go

    	fieldValues := make([]interface{}, len(relForeignFields))
    
    	// clean up old values before preloading
    	switch reflectValue.Kind() {
    	case reflect.Struct:
    		switch rel.Type {
    		case schema.HasMany, schema.Many2Many:
    			tx.AddError(rel.Field.Set(tx.Statement.Context, reflectValue, reflect.MakeSlice(rel.Field.IndirectFieldType, 0, 10).Interface()))
    		default:
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 11.6K bytes
    - Viewed (0)
Back to top