- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for Unscoped (0.13 sec)
-
tests/joins_table_test.go
t.Fatalf("Should found soft deleted addresses with unscoped") } DB.Model(&person).Association("Addresses").Clear() if DB.Model(&person).Association("Addresses").Count() != 0 { t.Fatalf("Should deleted all addresses") } if DB.Unscoped().Model(&person).Association("Addresses").Count() != 2 { t.Fatalf("Should found soft deleted addresses with unscoped") } DB.Unscoped().Model(&person).Association("Addresses").Clear()
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Sep 10 13:46:18 UTC 2020 - 3.5K bytes - Viewed (1) -
tests/helper_test.go
} func isMysql() bool { return os.Getenv("GORM_DIALECT") == "mysql" } func isSqlite() bool { return os.Getenv("GORM_DIALECT") == "sqlite" } func db(unscoped bool) *gorm.DB { if unscoped { return DB.Unscoped() } else { return DB }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 8K bytes - Viewed (0) -
tests/soft_delete_test.go
t.Errorf("Age soft deleted record, expects: %v, got: %v", 0, age) } if err := DB.Unscoped().First(&User{}, "name = ?", user.Name).Error; err != nil { t.Errorf("Should find soft deleted record with Unscoped, but got err %s", err) } count = 0 if DB.Unscoped().Model(&User{}).Where("name = ?", user.Name).Count(&count).Error != nil || count != 1 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 5.7K bytes - Viewed (0) -
tests/delete_test.go
if err := DB.Table("deleted_users").Unscoped().First(&result3, user.ID).Error; err != nil { t.Fatalf("failed to find record, got error %v", err) } if err := DB.Table("deleted_users").Unscoped().Delete(&result).Error; err != nil { t.Errorf("failed to delete user with unscoped, got error %v", err) } var result4 UserWithDelete
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 07:03:34 UTC 2023 - 9.4K bytes - Viewed (0) -
soft_delete.go
} func (sd SoftDeleteQueryClause) MergeClause(*clause.Clause) { } func (sd SoftDeleteQueryClause) ModifyStatement(stmt *Statement) { if _, ok := stmt.Clauses["soft_delete_enabled"]; !ok && !stmt.Statement.Unscoped { if c, ok := stmt.Clauses["WHERE"]; ok { if where, ok := c.Expression.(clause.Where); ok && len(where.Exprs) >= 1 { for _, expr := range where.Exprs {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 4.5K bytes - Viewed (1) -
impl/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java
} public <T> Provider<T> scope(final Key<T> key, Provider<T> unscoped) { Object qualifier = key.getAnnotation() instanceof Named n ? n.value() : key.getAnnotation(); org.apache.maven.di.Key<T> k = org.apache.maven.di.Key.ofType(key.getTypeLiteral().getType(), qualifier); return scope(k, unscoped::get)::get; }
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 3.3K bytes - Viewed (0) -
callbacks/delete.go
modelValue := reflect.New(rel.FieldSchema.ModelType).Interface() tx := db.Session(&gorm.Session{NewDB: true}).Model(modelValue) withoutConditions := false if db.Statement.Unscoped { tx = tx.Unscoped() } if len(db.Statement.Selects) > 0 { selects := make([]string, 0, len(db.Statement.Selects)) for _, s := range db.Statement.Selects { if s == clause.Associations {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Feb 25 02:48:23 UTC 2022 - 5.6K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
Logo: "logo", }, } if err := tx.Create(&item).Error; err != nil { t.Fatalf("failed to create items, got error: %v", err) } // test replace if err := tx.Model(&item).Association("ItemParent").Unscoped().Replace(&ItemParent{ Logo: "updated logo", }); err != nil { t.Errorf("failed to replace item parent, got error: %v", err) } var parents []ItemParent if err := tx.Find(&parents).Error; err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 9.3K bytes - Viewed (0) -
dbflute_fess/dfprop/conditionBeanMap.dfprop
# # and LessThan at PRODUCT.PRODUCT_NAME and PRODUCT.PRODUCT_HANDLE_CODE, # # and InScope for LONGVARCHAR(e.g. text type) is excluded. # ; String = map:{ # ; GreaterThan = map:{ MEMBER = list:{ MEMBER_ACCOUNT } } # ; LessThan = map:{ PRODUCT = list:{ PRODUCT_NAME ; PRODUCT_HANDLE_CODE } } # ; !InScope = map:{ $$ALL$$ = list:{ type:LONGVARCHAR } } # }
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 31 23:35:14 UTC 2015 - 4K bytes - Viewed (0) -
compat/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java
resolutionErrorHandler.throwErrors(request, result); assertEquals(2, result.getArtifacts().size()); // // System scoped version which should // d.setScope(Artifact.SCOPE_SYSTEM); File file = new File(getBasedir(), "src/test/repository-system/maven-core-2.1.0.jar"); assertTrue(file.exists());
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 8.8K bytes - Viewed (0)