- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 53 for associations (0.07 sec)
-
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 Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Feb 13 06:16:26 UTC 2025 - 14.4K bytes - Viewed (0) -
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 Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
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 Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Feb 02 09:15:08 UTC 2023 - 1.7K bytes - Viewed (0) -
association.go
association.Error = err } 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 Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 7.6K bytes - Viewed (0) -
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 Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Jul 21 02:46:58 UTC 2025 - 9.5K bytes - Viewed (0) -
callbacks/preload.go
"gorm.io/gorm/utils" ) // parsePreloadMap extracts nested preloads. e.g. // // // schema has a "k0" relation and a "k7.k8" embedded relation // parsePreloadMap(schema, map[string][]interface{}{ // clause.Associations: {"arg1"}, // "k1": {"arg2"}, // "k2.k3": {"arg3"}, // "k4.k5.k6": {"arg4"}, // }) // // preloadMap is // map[string]map[string][]interface{}{ // "k0": {}, // "k7": {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 11.7K bytes - Viewed (0) -
tests/create_test.go
CheckUser(t, result, user) user2 := *GetUser("omit_create", Config{Account: true, Pets: 3, Toys: 3, Company: true, Manager: true, Team: 3, Languages: 3, Friends: 4}) DB.Omit(clause.Associations).Create(&user2) var result2 User DB.Preload(clause.Associations).First(&result2, user2.ID) user2.Account = Account{} user2.Toys = nil user2.Manager = nil user2.Company = Company{} user2.Pets = nil user2.Team = nil
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Jul 21 09:55:20 UTC 2025 - 26.8K bytes - Viewed (0) -
README.md
[](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 Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Nov 07 02:20:06 UTC 2023 - 1.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableRangeMap.java
checkNotNull(value); checkArgument(!range.isEmpty(), "Range must not be empty, but was %s", range); entries.add(immutableEntry(range, value)); return this; } /** Copies all associations from the specified range map into this builder. */ @CanIgnoreReturnValue public Builder<K, V> putAll(RangeMap<K, ? extends V> rangeMap) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 14.7K bytes - Viewed (0)