- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 44 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 Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Apr 11 03:06:13 UTC 2023 - 14.3K 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 Nov 03 09:35:10 UTC 2024 - 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 Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Feb 02 09:15:08 UTC 2023 - 1.7K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 21:19:52 UTC 2024 - 6.5K 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 Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 07:03:34 UTC 2023 - 9.4K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 21:19:52 UTC 2024 - 7.7K 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 Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:52:33 UTC 2024 - 11.6K 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 Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
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 Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Nov 07 02:20:06 UTC 2023 - 1.8K 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 Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0)