Commit Graph

90 Commits

Author SHA1 Message Date
Nathan Osman 8e7d807ebf Allow name of column to be customized to support self-referencing many2many fields. 2018-02-10 21:21:50 +08:00
Jinzhu d61b7db8fa Fix postgres tests 2017-08-11 18:03:32 +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 b870f86fba Fix set Scanner's data type 2017-02-06 08:43:49 +08:00
Jinzhu 6633f325b8 Fix table name in singular mode in some cases 2017-02-05 18:38:30 +08:00
Jinzhu 1aa2d4ca89 Fix primary key for embedded struct 2017-01-09 20:07:39 +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
Jinzhu 446ce99a42 Support set prefix for embedded struct 2016-09-05 22:26:57 +08:00
Jinzhu f26fa242cc Support specify GORM tag setting inside scanner 2016-08-25 17:59:26 +08:00
Jinzhu 8f0f5df8c6 Don't set auto increment primary key's HasDefaultValue to true 2016-08-13 21:46:49 +08:00
Christophe de Vienne 608fd976c4 Fix auto_increment on postgres database. 2016-06-20 15:00:19 +02:00
Jinzhu 4786e830d6 Fix create join table 2016-05-09 22:32:33 +08:00
Jinzhu 465f8ea05b Fix ignore fields 2016-05-02 19:34:11 +08:00
Jinzhu 2e9d5e6f76 Test overwrite foreign keys 2016-03-07 23:51:04 +08:00
Jinzhu 2c089573cd Add tests for override belogns to foreign keys with tag 2016-03-07 23:35:31 +08:00
Jinzhu 88184a989e Update godoc 2016-03-07 21:09:05 +08:00
Jinzhu ec110657da Refactor based on golint 2016-03-07 17:49:55 +08:00
Jinzhu 552d9bf455 Refactor DataTypeOf for sqlite 2016-02-14 11:51:53 +08:00
Jinzhu 2dfd76d22b Refactor DataTypeOf 2016-01-29 15:08:53 +08:00
Jinzhu d92c5db9e7 Refactor dialect 2016-01-19 13:11:11 +08:00
Jinzhu 8d716be896 Fix some go vet/lint reports 2016-01-15 21:16:48 +08:00
Jinzhu 84942c60b8 Include tag settings when clone a StructField 2016-01-08 09:02:01 +08:00
Jinzhu d1892d3177 Support poiner of Scanner 2016-01-04 18:42:47 +08:00
Jinzhu 8aa7b475d4 Add more tests for one to many relations with customized foreign keys 2016-01-04 12:23:24 +08:00
Jinzhu d87a960248 Test many to many relation with customized column 2016-01-04 08:26:02 +08:00
Jinzhu d7237be63c Support poiner of time 2016-01-03 20:27:08 +08:00
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