Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 59 for Associations (0.06 sec)

  1. callbacks/associations.go

    	}
    
    	if len(selects) > 0 {
    		tx = tx.Select(selects)
    	} else if restricted && len(omits) == 0 {
    		tx = tx.Omit(clause.Associations)
    	}
    
    	if len(omits) > 0 {
    		tx = tx.Omit(omits...)
    	}
    
    	return db.AddError(tx.Create(values).Error)
    }
    
    // check association values has been saved
    // if values kind is Struct, check it has been saved
    // if values kind is Slice/Array, check all items have been saved
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Thu Feb 13 06:16:26 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  2. tests/preload_test.go

    				},
    				AddressID:     org.AddressID,
    				Address:       nil,
    				NestedAddress: org.NestedAddress,
    			},
    		}, {
    			name: "associations",
    			preloads: map[string][]interface{}{
    				clause.Associations: {},
    				// clause.Associations won’t preload nested associations
    				"Address.Country": {},
    			},
    			expect: org,
    		},
    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Wed Jun 12 10:00:47 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  3. tests/association_generics_test.go

    	}
    
    	// Test Set + Update with multiple association operations
    	assocOp1 := clause.Association{
    		Association: "Pets",
    		Type:        clause.OpCreate,
    		Set: []clause.Assignment{
    			{Column: clause.Column{Name: "name"}, Value: "test-pet-1"},
    		},
    	}
    
    	assocOp2 := clause.Association{
    		Association: "Toys",
    		Type:        clause.OpCreate,
    		Set: []clause.Assignment{
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Fri Sep 12 05:42:26 UTC 2025
    - 37.9K bytes
    - Viewed (0)
  4. clause/clause.go

    			builder.WriteByte(' ')
    			c.AfterExpression.Build(builder)
    		}
    	}
    }
    
    const (
    	PrimaryKey   string = "~~~py~~~" // primary key
    	CurrentTable string = "~~~ct~~~" // current table
    	Associations string = "~~~as~~~" // associations
    )
    
    var (
    	currentTable  = Table{Name: CurrentTable}
    	PrimaryColumn = Column{Table: CurrentTable, Name: PrimaryKey}
    )
    
    // Column quote with name
    type Column struct {
    	Table string
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Thu Feb 02 09:15:08 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/RangeMap.java

       */
      void putCoalescing(Range<K> range, V value);
    
      /** Puts all the associations from {@code rangeMap} into this range map (optional operation). */
      void putAll(RangeMap<K, ? extends V> rangeMap);
    
      /** Removes all associations from this range map (optional operation). */
      void clear();
    
      /**
       * Removes all associations from this range map in the specified range (optional operation).
       *
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. tests/update_has_one_test.go

    		}
    		if err := DB.AutoMigrate(&CustomizeAccount{}); err != nil {
    			t.Fatalf("failed to migrate, got error: %v", err)
    		}
    
    		number := "number-has-one-associations"
    		cusUser := CustomizeUser{
    			Name: "update-has-one-associations",
    			Account: CustomizeAccount{
    				Number:  number,
    				Number2: number,
    			},
    		}
    
    		if err := DB.Create(&cusUser).Error; err != nil {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Thu Jul 14 06:55:54 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  7. README.md

    [![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-blue?logo=go&logoColor=white)](https://pkg.go.dev/gorm.io/gorm?tab=doc)
    
    ## Overview
    
    * Full-Featured ORM
    * Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism, Single-table inheritance)
    * Hooks (Before/After Create/Save/Update/Delete/Find)
    * Eager loading with `Preload`, `Joins`
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Thu Oct 30 09:30:20 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  8. association.go

    		}
    	}
    
    	return association
    }
    
    func (association *Association) Unscoped() *Association {
    	return &Association{
    		DB:           association.DB,
    		Relationship: association.Relationship,
    		Error:        association.Error,
    		Unscope:      true,
    	}
    }
    
    func (association *Association) Find(out interface{}, conds ...interface{}) error {
    	if association.Error == nil {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sun Oct 26 12:09:12 UTC 2025
    - 23.6K bytes
    - Viewed (0)
  9. tests/delete_test.go

    	}
    
    	if err := DB.Select(clause.Associations, "Pets.Toy").Delete(&user).Error; err != nil {
    		t.Fatalf("failed to delete user, got error %v", err)
    	}
    
    	for key, value := range map[string]int64{"Account": 1, "Pets": 2, "Toys": 4, "Company": 1, "Manager": 1, "Team": 1, "Languages": 0, "Friends": 0} {
    		if count := DB.Unscoped().Model(&user).Association(key).Count(); count != value {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Mon Jul 21 02:46:58 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/RangeMap.java

       */
      void putCoalescing(Range<K> range, V value);
    
      /** Puts all the associations from {@code rangeMap} into this range map (optional operation). */
      void putAll(RangeMap<K, ? extends V> rangeMap);
    
      /** Removes all associations from this range map (optional operation). */
      void clear();
    
      /**
       * Removes all associations from this range map in the specified range (optional operation).
       *
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 7.6K bytes
    - Viewed (0)
Back to top