Commit Graph

105 Commits

Author SHA1 Message Date
Jinzhu 1f05cb7e55 Handle Associations with pointer of pointer, close #3130 2020-07-10 22:53:03 +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 e490e09db5 Add SetupJoinTable support 2020-06-01 23:58:22 +08:00
Jinzhu 1559fe24e5 Add more updates test 2020-06-01 19:41:33 +08:00
Jinzhu 55074213bc Add SoftDelete support 2020-05-29 07:35:45 +08:00
Jinzhu c299cb8db6 Refactor association 2020-05-26 11:19:01 +08:00
Jinzhu 8de2bb4eab Test single table many2many association 2020-05-26 01:57:22 +08:00
Jinzhu 457f1e5d73 Test Many2Many Association for Slice 2020-05-26 01:21:15 +08:00
Jinzhu dea48a8c59 Test Many2Many Association 2020-05-26 00:16:44 +08:00
Jinzhu 135d9f8b03 Test HasMany Association for Slice 2020-05-25 11:57:58 +08:00
Jinzhu 5d9b57cc4e Test HasMany Association 2020-05-25 11:11:09 +08:00
Jinzhu 91eaf0bb21 Test HasOne Association for Slice 2020-05-24 23:43:42 +08:00
Jinzhu 6a0ef985ff Test Polymorphic HasOne Association 2020-05-24 23:28:06 +08:00
Jinzhu 68a7a8207a Test HasOne Association 2020-05-24 23:07:42 +08:00
Jinzhu 677c745b62 Test shared association 2020-05-24 21:46:53 +08:00
Jinzhu 2db33730b6 Add Slice Association for BelongsTo 2020-05-24 20:53:20 +08:00
Jinzhu 91a695893c Test Association For BelongsTo 2020-05-24 18:33:15 +08:00
Jinzhu cbc4a81140 Add Count tests 2020-05-24 11:35:19 +08:00
Jinzhu 5ec4fee797 Don't preload if foreign keys zero 2020-05-23 21:09:03 +08:00
Jinzhu 72460df1bd Fix associations find 2020-05-23 11:57:28 +08:00
Jinzhu 0f21272c7f Finish implement association support 2020-05-20 23:44:50 +08:00
Jinzhu 20cb57b1ac Add association Delete support 2020-05-20 02:03:43 +08:00
Jinzhu 922a8efc53 Generate Query Conds for Relationship 2020-05-19 21:50:06 +08:00
Jinzhu f999240e10 Define association API, add conds to when preloading 2020-05-14 20:54:50 +08:00
Jinzhu 5ccd76f76c Setup Transaction 2020-02-23 23:28:59 +08:00
Jinzhu b9cce2be6a Add clause, DB API, model definition 2020-01-29 19:22:44 +08:00
Jinzhu f0d514e330 Cleanup 2020-01-28 16:22:07 +08:00
RikiyaFujii 50c61291de add comment (#2163)
* add comment

* typo
2018-11-03 21:55:52 +08:00
Iskander (Alex) Sharipov 742154be9a rewrite if-else chain as switch statement (#2121)
From effective Go: https://golang.org/doc/effective_go.html#switch

> It's therefore possible—and idiomatic—to write an if-else-if-else chain as a switch.
2018-10-07 08:49:37 +08:00
Jinzhu 44b9911f51 Refactor self referencing m2m support 2018-02-10 21:21:50 +08:00
Jinzhu eae7f6be60 Fix source type is incorrect error for embedded many to many relationship 2017-06-14 17:33:21 +08:00
Jinzhu a667ab8427 Fix Replace has one/many associations 2016-10-20 13:27:26 +08:00
Jinzhu afaadc3942 Refactor named value support for PolymorphicType 2016-10-06 20:33:48 +08:00
slockij 1413e55339 Add named value for PolymorphicType (to replace scope.TableName) 2016-09-28 22:44:43 +02:00
Björn f159fa3d74 association: dont execute Append/Replace/Delete if Error already present 2016-05-06 14:10:43 +02:00
Jinzhu 3055bad1e8 scope.Fields() return slice of *Field 2016-03-07 14:25:41 +08:00
Jinzhu 6bd0862811 Only update non blank fields that has been changed 2016-02-18 23:17:35 +08:00
Jinzhu dc23ae63bf Keep refactoring association mode 2016-01-16 17:29:39 +08:00
Jinzhu 67874f9232 Keep Refactoring Association Mode 2016-01-16 08:23:38 +08:00
Jinzhu 822e895d4d Refactor getColumnAsArray 2016-01-15 22:55:37 +08:00
Jinzhu 41870191b0 Refactor Association Mode 2016-01-15 22:14:21 +08:00
Jinzhu 8d716be896 Fix some go vet/lint reports 2016-01-15 21:16:48 +08:00
Jinzhu 341d047aa7 Rollback to old Unscoped API 2016-01-12 15:27:25 +08:00
Jinzhu 801a271d07 Fix Association Count 2016-01-12 12:31:05 +08:00
Jinzhu d87a960248 Test many to many relation with customized column 2016-01-04 08:26:02 +08:00
Jinzhu b59eaf526e Set Error to Association when some error happend 2016-01-03 17:52:16 +08:00
Jinzhu aa55bd3fd2 Add more tests for customized foreign keys for many2many relations 2016-01-03 17:20:24 +08:00
Jinzhu 9455215e61 Add association tests for composite primary key 2015-12-31 11:17:10 +08:00
Jinzhu 934e97b018 Don't need NOT IN conditions when there are no primary keys found 2015-12-30 15:34:56 +08:00