Commit Graph

2619 Commits

Author SHA1 Message Date
Jinzhu a0f4d3f7d2 Save as empty string for not nullable nil field serialized into json 2022-10-18 16:25:39 +08:00
Jinzhu ab5f80a8d8 Save as NULL for nil object serialized into json 2022-10-18 15:44:56 +08:00
Cr 186e8a9e14
fix: association without pks (#5779) 2022-10-18 11:58:42 +08:00
Jinzhu 2a788fb20c Upgrade tests go.mod 2022-10-17 17:01:42 +08:00
Jinzhu aa4312ee74 Don't display any GORM related package path as source 2022-10-17 17:01:42 +08:00
Jinzhu 08aa2f9888 Update README 2022-10-14 20:30:41 +08:00
Jinzhu 2c56954cb1 tests mariadb with returning support 2022-10-08 20:48:22 +08:00
Jinzhu e93dc3426e Test postgres autoincrement check 2022-10-08 17:16:32 +08:00
Jinzhu 983e96f142 Add tests for alter column type 2022-10-08 16:04:57 +08:00
Jinzhu 34fbe84580 Add TableName with NamingStrategy support, close #5726 2022-10-07 21:18:37 +08:00
robhafner e8f48b5c15
fix: limit=0 results (#5735) (#5736) 2022-10-07 20:14:14 +08:00
jesse.tang 4b22a55a75
fix: primaryFields are overwritten (#5721) 2022-10-07 18:29:28 +08:00
Wen Sun 9564b82975
Fix OnConstraint builder (#5738) 2022-10-07 13:46:20 +08:00
Cr 0b7113b618
fix: prepare deadlock (#5568)
* fix: prepare deadlock

* chore[ci skip]: code style

* chore[ci skip]: test remove unnecessary params

* fix: prepare deadlock

* fix: double check prepare

* test: more goroutines

* chore[ci skip]: improve code comments

Co-authored-by: Jinzhu <wosmvp@gmail.com>
2022-09-30 18:13:36 +08:00
Stephano George a3cc6c6088 Fix: wrong value when Find with Join with same column name, close #5723, #5711 2022-09-30 17:18:42 +08:00
jesse.tang be440e7512
fix possible nil panic in tests (#5720)
* fix maybe nil panic

* reset code
2022-09-30 11:14:34 +08:00
dependabot[bot] e1dd0dcbc4
chore(deps): bump actions/stale from 5 to 6 (#5717)
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-30 11:13:01 +08:00
Nguyen Huu Tuan 328f301982
add some test case which related the logic (#5477) 2022-09-22 18:35:21 +08:00
kinggo 12237454ed fix: use preparestmt in trasaction will use new conn, close #5508 2022-09-22 16:47:43 +08:00
Cr 73bc53f061
feat: migrator support type aliases (#5627)
* feat: migrator support type aliases

* perf: check type
2022-09-22 15:56:32 +08:00
Cr 101a7c789f
fix: scan array (#5624)
Co-authored-by: Jinzhu <wosmvp@gmail.com>
2022-09-22 15:51:47 +08:00
Jinzhu 3a72ba102e Allow shared foreign key for many2many jointable 2022-09-22 15:03:41 +08:00
jesse.tang 1f634c3937
support scan assign slice cap (#5634)
* support scan assign slice cap

* fix
2022-09-22 14:50:35 +08:00
Cr 5ed7b1a65e
fix: same embedded filed name (#5705) 2022-09-22 11:25:03 +08:00
qqxhb 490625981a
fix: update omit (#5699) 2022-09-16 15:02:44 +08:00
Googol Lee edb00c10ad
AutoMigrate() should always migrate checks, even there is no relationship constraints. (#5644)
* fix: remove uuid autoincrement

* AutoMigrate() should always migrate checks, even there is no relationship constranits.

Co-authored-by: a631807682 <631807682@qq.com>
2022-09-14 10:26:51 +08:00
Bruce MacKenzie f29afdd329
Rewrite of finisher_api Godocs (#5618) 2022-09-09 11:16:41 +08:00
Jiepeng Cao b3eb1c8c51
simplified regexp (#5677) 2022-09-05 15:39:19 +08:00
jesse.tang f78f635fae
Optimize: code logic db.scanIntoStruct() (#5633) 2022-09-05 15:34:33 +08:00
Cr d71caef7d9
fix: remove uuid autoincrement (#5620) 2022-09-03 20:00:21 +08:00
Shunsuke Otani 8c3018b96a
Replace `ioutil.Discard` with `io.Discard` (#5603) 2022-08-15 10:50:06 +08:00
Shunsuke Otani 3f92b9b0df
Refactor: redundant type from composite literal (#5604) 2022-08-15 10:47:26 +08:00
Aoang ba227e8939
Add Go 1.19 Support (#5608) 2022-08-15 10:46:57 +08:00
enwawerueli 573b9fa536 fix: correct grammar 2022-08-15 10:28:36 +08:00
Bruce MacKenzie a35883590b
update Delete Godoc to describe soft delete behaviour (#5554) 2022-08-11 11:38:04 +08:00
Cr f223279384
chore: fix gorm tag (#5577) 2022-08-10 11:03:42 +08:00
hjwblog.com 6e03b97e26
fix: empty serilizer err #5524 (#5525)
* fix: empty serilizer err #5524

* feat: fix UnixSecondSerializer return nil

* feat: split type case

Co-authored-by: huanjiawei <huanjiawei@bytedance.com>
2022-07-27 13:59:47 +08:00
MJrocker 3c6eb14c92 Fixed some typos in the code comment 2022-07-27 10:22:49 +08:00
Cr 06e174e24d
fix: embedded default value (#5540) 2022-07-25 14:10:30 +08:00
Xudong Zhang bab3cd1724
fix bad logging performance of bulk create (#5520) (#5521) 2022-07-18 20:47:00 +08:00
Jinzhu 75720099b5 Create a new db in FindInBatches 2022-07-18 18:07:05 +08:00
Goxiaoy 2ba599e8b7
fix empty QueryClauses in association (#5502) (#5503)
* fix empty QueryClauses in association (#5502)

* test: empty QueryClauses in association (#5502)

* style: empty QueryClauses in association (#5502)

* style: empty QueryClauses in association (#5502)
2022-07-15 11:15:18 +08:00
alingse 099813bf11
Adjust ToStringKey use unpack params, fix pass []any as any in variadic function (#5500)
* fix pass []any as any in variadic function

* add .vscode to gitignore
2022-07-14 20:05:22 +08:00
Jinzhu 4d40e34734 Update select tests 2022-07-14 14:55:54 +08:00
Jinzhu 3262daf8d4 Fix select with association column 2022-07-13 18:26:35 +08:00
Jinzhu cae30e9a50 Fix select with association column 2022-07-13 18:02:11 +08:00
Jinzhu a7063848ef Fix select with uppercase column name 2022-07-13 17:44:14 +08:00
Jinzhu 08f6d06e47 Fix select with quoted column name 2022-07-13 17:21:19 +08:00
Jinzhu 62fdc2bb3b Fix serializer with empty string 2022-07-11 11:51:05 +08:00
Jinzhu b13d1757fa Refactor Model with slice data 2022-07-07 15:39:29 +08:00