Commit Graph

63 Commits

Author SHA1 Message Date
Jinzhu aa55bd3fd2 Add more tests for customized foreign keys for many2many relations 2016-01-03 17:20:24 +08:00
Jinzhu 0f5055471a Keep refactoring get model struct 2016-01-03 15:56:32 +08:00
Jinzhu 8a0c77e5fc Fix all tests for GetModelStruct 2016-01-03 14:16:58 +08:00
Jinzhu 4bc06a21c1 Refactor GetModelStruct 2016-01-03 14:04:59 +08:00
Jinzhu 6a5a2dbc55 Refactor GetModelStruct 2016-01-03 13:10:17 +08:00
Jinzhu 4e45e6dc2d Use field.TagSettings 2016-01-03 10:00:18 +08:00
Jinzhu 19b85b1f17 Compatible with both gorm, sql tag 2016-01-03 09:52:27 +08:00
Jinzhu 5d2b9bfe34 Refactor GetModelStruct 2016-01-03 09:46:07 +08:00
Jinzhu 9455215e61 Add association tests for composite primary key 2015-12-31 11:17:10 +08:00
Peter Waller 5ba59aec5f Give (*ModelStruct).TableName() a pointer receiver
There was a data race caused by the copy of the ModelStruct. See #723.

Fixes #723.
2015-12-23 10:42:03 +00:00
Jinzhu 341703ed5d Scan value into ignored fields if there is no ambiguity 2015-12-11 11:45:22 +08:00
Jinzhu 84c6b46011 Update inflection address 2015-12-03 15:18:42 +08:00
Jinzhu ea83dec214 Use false to decline antuincrement 2015-11-22 09:35:18 +08:00
otiai10 ba12202af2 Enable to decline antuincrement on ID field 2015-11-21 18:15:47 +09:00
Nikola Kovacs c691b33ce5 remove unused tabler interface 2015-10-01 10:25:02 +02:00
Jinzhu 8a2b73723d Better compatibility for complex sql type 2015-10-01 08:06:08 +08:00
Jinzhu 4da2c28d4d Fix data race warning when get cached model struct 2015-10-01 07:09:00 +08:00
Jinzhu 37bf87aa29 Fix can't load preload fields correctly 2015-09-26 00:41:07 +08:00
Jinzhu edc1f78530 Fix calculate fields for the first time 2015-09-11 07:36:48 +08:00
Jinzhu 9982134955 Fix preload many2many with multiple primary keys 2015-08-18 09:19:50 +08:00
kimiby 281c5d10f6 preload_m2m improve 2015-08-16 12:36:23 +03:00
Jinzhu 1d4f908ea2 Fixed detecting pointers as a Scanner. thanks @NOX73 2015-08-12 22:28:01 +08:00
Jinzhu 05b3f036f8 Change plural engine to github.com/qor/inflection 2015-08-01 11:20:08 +08:00
Jinzhu 6a7dda9a32 Fix AssociationForeignFieldNames for many2many relations 2015-07-31 15:25:33 +08:00
Jinzhu f00b95d305 Passed all tests for multiple primary keys 2015-07-30 22:59:25 +08:00
Jinzhu f50956cfef Fix test TestSelectWithCreate 2015-07-30 22:36:04 +08:00
Jinzhu 9c52c29e90 Fix test TestRelated 2015-07-30 18:56:05 +08:00
Jinzhu 7decf73356 Fix test TestHasOneAndHasManyAssociation 2015-07-30 18:41:43 +08:00
Jinzhu 4e8272cf9d Fix compile error for preload 2015-07-30 18:19:49 +08:00
Jinzhu fea291e796 Fix compile error for scope_private 2015-07-30 17:58:49 +08:00
Jinzhu a29230c86f multpile foreign keys 2015-07-30 16:23:51 +08:00
Jinzhu b96ca76e59 Set table name handler 2015-05-27 12:19:48 +08:00
Jinzhu b9a39be9c5 Add Tabler 2015-04-08 11:36:01 +08:00
Jinzhu 1e28551d25 Fix additional SQL type 2015-03-20 17:21:17 +08:00
Jinzhu 94a5ebe5b4 Refactor JoinTableHandler 2015-03-20 11:22:14 +08:00
Jinzhu fa753969b1 Fix stack overflow 2015-03-19 16:31:11 +08:00
Jinzhu c13e2f18f8 New JoinTableHandler 2015-03-18 11:47:11 +08:00
Jinzhu df33db6ff9 Save cached model structs globally 2015-03-11 18:33:50 +08:00
Jinzhu a549b6bd49 Refactor SQL Tag 2015-03-11 17:05:58 +08:00
Jinzhu 49454839bd Support Multi primary keys 2015-03-11 11:28:30 +08:00
Jinzhu b391029188 Fix stack overflow for many to many associations 2015-02-28 19:09:45 +08:00
Jinzhu da8fc53c86 Set IsForeignKey for StructField 2015-02-28 15:54:38 +08:00
Jinzhu 087b7083ad Fix scope Fields with embedded struct 2015-02-25 11:17:33 +08:00
Jinzhu 07af30c548 Fix primary key in embedded struct 2015-02-25 10:57:21 +08:00
Jinzhu 10340e6ad7 Support SQL expression 2015-02-24 22:06:35 +08:00
Jinzhu 406a01875c Test using pointer as struct fields 2015-02-20 22:06:49 +08:00
Jinzhu af7da1ec44 GetModelStruct without relations 2015-02-18 13:16:32 +08:00
Jinzhu 0d2c37e310 Refactor Model Struct 2015-02-18 12:50:37 +08:00
Jinzhu 9e5c64d611 Refactor model struct 2015-02-18 11:37:08 +08:00
Jinzhu 5c478b46e1 Use Common Initialisms from golint 2015-02-18 10:36:32 +08:00