Commit Graph

27 Commits

Author SHA1 Message Date
chenrui 8559f51102 fix: should add deleted_at exprs for every joins 2022-03-07 20:33:12 +08:00
chenrui ce13a2a7bc fix: soft delete for join.on 2022-03-07 14:39:56 +08:00
Jinzhu 6a18a15c93 Refactor check missing where condition 2022-02-25 10:48:23 +08:00
Jinzhu 39d84cba5f Add serializer support (#5078)
* Update context

* Update GormFieldValuer

* Add Serializer

* Add Serializer Interface

* Refactor gorm field

* Refactor setter, valuer

* Add sync.Pool

* Fix test

* Add pool manager

* Fix pool manager

* Add poolInitializer

* Add Serializer Scan support

* Add Serializer Value method

* Add serializer test

* Finish Serializer

* Fix JSONSerializer for postgres

* Fix JSONSerializer for sqlserver

* Test serializer tag

* Add unixtime serializer

* Update go.mod
2022-02-19 17:02:53 +08:00
kinggo 8dde09e0be
fix: generate sql incorrect when use soft_delete and only one OR (#4969)
* fix: generate sql incorrect when use soft_delete and only one OR
2021-12-30 11:47:14 +08:00
liweitingwt 24026bf1fe
modify unscoped judge (#4929)
* modify unscoped judge

* modify unscoped judge

Co-authored-by: liweiting <liweiting1995@gmail.com>
2021-12-16 10:41:34 +08:00
kinggo e5bdd610c3
fix: save not use soft_delete (#4897)
* fix: Save not use soft_delete

* fix: save not use soft_delete

* fix: save not use soft_delete

* fix: save not use soft_delete

Co-authored-by: kinggo <>
2021-12-08 13:58:06 +08:00
Jinzhu e953880d19 Add returning tests 2021-10-28 09:17:33 +08:00
Jinzhu 810058cd55 Fix soft delete with Update 2021-06-01 18:34:38 +08:00
Shubhendra Singh Chauhan 0348b1d3c1
chore: improve code quality (#4123)
* Combine multiple `append`s into a single call

* Clean up copied struct fields with type conversion

* Remove unnecessary use of slice
2021-03-08 10:46:43 +08:00
Jinzhu 14a0976dd4 populate the DeletedAt field when soft delete, fix #3855 2020-12-15 10:39:20 +08:00
Jinzhu fcf2ab6c0e Add deleted_at check when soft deleting, fix #3720 2020-11-05 11:20:08 +08:00
Amit Basuri 57b033e2dd
Marshalling zero valued Deleted at to nullhttps://github.com/go-gorm/gorm/issues/3693 (#3695) 2020-11-02 10:03:39 +08:00
Jinzhu 3ebdcbdb18 Marshal invalid DeletedAt as null, fix #3693 2020-10-30 19:08:20 +08:00
Jinzhu a8141b6cc9 Fix DeletedAt marshal and unmarshal, close #3693 2020-10-30 18:15:07 +08:00
Jinzhu 9b2181199d Fix soft delete with OrCondition, close #3627 2020-10-19 14:50:11 +08:00
Jinzhu 689d6e2331 Fix DeletedAt marshalling, close #3598 2020-10-13 14:12:03 +08:00
Jinzhu bf6123b01e Fix duplicated soft delete clause 2020-09-01 18:05:26 +08:00
Jinzhu 3dfa8a66f1 Fix panic when delet without pointer, close #3308 2020-08-25 17:27:28 +08:00
Jinzhu ebdb4edda8 Add AllowGlobalUpdate mode 2020-08-23 20:08:23 +08:00
Jinzhu 681268cc43 Refactor Create/Query/Update/DeleteClauses interface 2020-08-17 16:31:09 +08:00
Jinzhu 39c8d6220b Fix soft delete panic when using unaddressable value 2020-08-06 17:48:46 +08:00
Jinzhu 33c48611b6 Fix customize table with Delete, close #3129 2020-07-10 13:08:29 +08:00
Jinzhu 2ae0653af2 Fix ambiguous column when using same column name in join table, close #3120 2020-07-09 09:03:48 +08:00
Jinzhu e986371a42 Rename package name 2020-06-02 09:18:01 +08:00
Jinzhu b3b19a5577 Test Override NowFunc 2020-05-31 11:34:59 +08:00
Jinzhu 55074213bc Add SoftDelete support 2020-05-29 07:35:45 +08:00