gorm/schema
Truong Nguyen ed474152b1
Fix: Composite primary key with auto-increment value returns 0 after insert (#6127)
* Fix #4930 workaround for databases that support auto-increment in composite primary key.

* Add test for composite key with auto-increment.

* schema.go: use field.AutoIncrement instead of field.TagSettings["AUTOINCREMENT"], add test to check autoincrement:false

create_test.go: remove unused code: drop table CompositeKeyProduct

---------

Co-authored-by: Jinzhu <wosmvp@gmail.com>
2023-03-10 16:50:03 +08:00
..
callbacks_test.go ci: add gofumpt check in reviewdog (#4973) 2022-01-06 15:02:53 +08:00
check.go ci: add gofumpt check in reviewdog (#4973) 2022-01-06 15:02:53 +08:00
check_test.go Rename package name 2020-06-02 09:18:01 +08:00
field.go Fix possible concurrency problem for serializer 2023-03-10 16:39:57 +08:00
field_test.go Add serializer support (#5078) 2022-02-19 17:02:53 +08:00
index.go fix(schema): field is only unique when there is one unique index (#5974) 2023-01-11 14:05:39 +08:00
index_test.go fix(schema): field is only unique when there is one unique index (#5974) 2023-01-11 14:05:39 +08:00
interfaces.go Add serializer support (#5078) 2022-02-19 17:02:53 +08:00
model_test.go ci: add gofumpt check in reviewdog (#4973) 2022-01-06 15:02:53 +08:00
naming.go style: fix linter check for NamingStrategy and onConflictOption (#5174) 2022-03-20 09:02:45 +08:00
naming_test.go Fix naming longer then 64 chars with dots in table (#5045) 2022-02-24 10:10:20 +08:00
pool.go Remove shared sync pool for Scanner compatibility 2022-04-11 21:37:44 +08:00
relationship.go Issue 6054: Unscoped not working with PreLoad on Joins (#6058) 2023-02-18 09:06:43 +08:00
relationship_test.go Allow shared foreign key for many2many jointable 2022-09-22 15:03:41 +08:00
schema.go Fix: Composite primary key with auto-increment value returns 0 after insert (#6127) 2023-03-10 16:50:03 +08:00
schema_helper_test.go Add serializer support (#5078) 2022-02-19 17:02:53 +08:00
schema_test.go Fix: Composite primary key with auto-increment value returns 0 after insert (#6127) 2023-03-10 16:50:03 +08:00
serializer.go Issue 6054: Unscoped not working with PreLoad on Joins (#6058) 2023-02-18 09:06:43 +08:00
utils.go fix: update panic if model is not ptr (#6037) 2023-02-18 09:20:29 +08:00
utils_test.go Remove autoincrement tag for join table, close #3217 2020-07-31 18:19:25 +08:00