Cr
186e8a9e14
fix: association without pks ( #5779 )
2022-10-18 11:58:42 +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
Cr
c74bc57add
fix: association many2many duplicate elem ( #5473 )
...
* fix: association many2many duplicate elem
* chore: gofumpt style
2022-07-01 15:12:15 +08:00
Jinzhu
f92e6747cb
Handle field set value error
2022-03-23 17:24:25 +08:00
Jin
2d5cb997ed
style: fix linter check for NamingStrategy and onConflictOption ( #5174 )
2022-03-20 09:02:45 +08:00
chenrui
9b9ae325bb
fix: circular reference save, close #5140
...
commit 2ac099a37ac7bd74f0a98a6fdc42cc8527404144
Author: Jinzhu <wosmvp@gmail.com>
Date: Thu Mar 17 23:49:21 2022 +0800
Refactor #5140
commit 6e3ca2d1aa
Author: a631807682 <631807682@qq.com>
Date: Sun Mar 13 12:52:08 2022 +0800
test: add test for LoadOrStoreVisitMap
commit 9d5c68e410
Author: chenrui <chenrui@jingdaka.com>
Date: Thu Mar 10 20:33:47 2022 +0800
chore: add more comment
commit bfffefb179
Author: chenrui <chenrui@jingdaka.com>
Date: Thu Mar 10 20:28:48 2022 +0800
fix: should check values has been saved instead of rel.Name
commit e55cdfa4b3
Author: chenrui <chenrui@jingdaka.com>
Date: Tue Mar 8 17:48:01 2022 +0800
chore: go lint
commit fe4715c5bd
Author: chenrui <chenrui@jingdaka.com>
Date: Tue Mar 8 17:27:24 2022 +0800
chore: add test comment
commit 326862f3f8
Author: chenrui <chenrui@jingdaka.com>
Date: Tue Mar 8 17:22:33 2022 +0800
fix: circular reference save
2022-03-17 23:53:31 +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
Jinzhu
8627634959
Fix create associations with zero primary key, close #4890
2021-12-02 10:20:16 +08:00
Jinzhu
27e2753c9d
Fix create duplicated value when updating nested has many relationship, close #4796
2021-11-29 18:43:39 +08:00
heige
9d5f315b6d
feat: go code style adjust and optimize code for callbacks package ( #4861 )
...
* feat: go code style adjust and optimize code for callbacks package
* Update scan.go
2021-11-29 09:33:20 +08:00
Jinzhu
3a8c250180
Refactor calc associations onConflictOption
2021-08-26 13:37:49 +08:00
zkqiang
e81833fd11
Fix onConflict with non-updatable in associations
2021-08-26 13:37:49 +08:00
Jinzhu
8e67a08774
Fix Scopes with Row, close #4465
2021-06-18 15:38:20 +08:00
heige
74e7a9ca07
Optimize reflect value length and method ( #4280 )
...
* Respect ignore migration when add column (#4276 )
continue https://github.com/go-gorm/gorm/pull/4028
* feat: Optimal value type acquisition for v (#4278 )
* feat: optimize relect value length and value
* feat: optimize ConvertSliceOfMapToValuesForCreate method
Co-authored-by: yrong1997 <yrong1997@gmail.com>
2021-04-14 13:00:54 +08:00
Jinzhu
220349ccf2
Fix omit associations, close #4161
2021-03-19 15:15:26 +08:00
Sivchari
adf85d5b82
change the method of initializing slice ( #4097 )
...
* change the method of initializing slice and fixed the length to be specified as 0
* keep the association.go code in the var group
* keep the association.go code in the var group
* change to initializing in var group
2021-03-04 19:44:15 +08:00
Jinzhu
eb9a704fda
Fix update UpdatedAt when full saving associations, close #4115
2021-02-26 17:11:25 +08:00
Jinzhu
940da051a7
Skip nested associations when create data with Select, close #4108
2021-02-23 19:35:24 +08:00
Jinzhu
deff0594ee
Save associations based on creatable/updatable permission, close #4056
2021-02-07 14:24:11 +08:00
Jinzhu
6d260a86bd
Fix Set/Get settings when saving associations, close #3908
2021-01-05 21:12:31 +08:00
Jinzhu
77bf4aecc6
Create associations w/o nested transaction option
2020-12-18 13:25:52 +08:00
Andrei Baibaratsky
f2321ca164
Fixed creation of associated records with composite primary keys (go-gorm#3817) ( #3818 )
2020-12-03 15:00:26 +08:00
Jinzhu
6186a4daa7
allow SkipHooks when preload & save associations
2020-11-20 16:56:52 +08:00
Jinzhu
a1a30c38de
Allow to omit fields when upsert associations, close #3762
2020-11-18 19:06:49 +08:00
Jinzhu
54b80b18bc
Allow to omit fields in associations, close #3752
2020-11-17 21:49:40 +08:00
Jinzhu
50df9da6a1
Allow to skip associations when creating join table for many2many, close #3605
2020-11-17 20:24:08 +08:00
Jinzhu
26504f5cae
Use NewDB to replace WithConditions for Session
2020-11-17 16:28:37 +08:00
Jinzhu
1e241aa645
Reduce GC alloc
2020-11-10 21:23:20 +08:00
Jinzhu
c0de3c5051
Support FullSaveAssociations Mode, close #3487 , #3506
2020-09-24 19:29:15 +08:00
Jinzhu
fcb666cfa3
Fix associations using composite primary keys without ID field, close #3365
2020-09-03 10:58:48 +08:00
Jinzhu
9fcc337bd1
Fix create from map
2020-08-17 17:41:36 +08:00
Jinzhu
4456df7a5d
Lint with golangci-lint
2020-07-16 11:27:12 +08:00
Jinzhu
3f355dc050
Refactor
2020-07-02 10:14:30 +08:00
Jinzhu
63e48191a8
Test failed to save association should rollback, close #3100
2020-07-01 21:28:19 +08:00
Jinzhu
f5566288de
Add SetColumn, Changed method
2020-06-30 16:53:54 +08:00
Jinzhu
a1e35bdc94
Support merge batch data some having primary values
2020-06-20 16:52:15 +08:00
Jinzhu
e986371a42
Rename package name
2020-06-02 09:18:01 +08:00
Jinzhu
1559fe24e5
Add more updates test
2020-06-01 19:41:33 +08:00
Jinzhu
befef0c9a9
Improve Hooks
2020-06-01 00:12:20 +08:00
Jinzhu
cc064f26ee
Add on conflict support
2020-05-25 23:11:42 +08:00
Jinzhu
135d9f8b03
Test HasMany Association for Slice
2020-05-25 11:57:58 +08:00
Jinzhu
68a7a8207a
Test HasOne Association
2020-05-24 23:07:42 +08:00
Jinzhu
91a695893c
Test Association For BelongsTo
2020-05-24 18:33:15 +08:00
Jinzhu
5ec4fee797
Don't preload if foreign keys zero
2020-05-23 21:09:03 +08:00
Jinzhu
2ca4e91d88
Fix LastInsertID with string primary key
2020-05-23 18:38:55 +08:00
Jinzhu
0f21272c7f
Finish implement association support
2020-05-20 23:44:50 +08:00
Jinzhu
85f3174467
Test has many associations
2020-04-22 09:38:32 +08:00
Jinzhu
43a814ae70
Add bulk create associations tests
2020-04-20 11:47:29 +08:00
Jinzhu
7bcd95d4b8
Add save associations for bulk create
2020-04-19 23:11:56 +08:00
Jinzhu
158bacefbe
Add save has many relations
2020-04-19 14:29:31 +08:00