Commit Graph

2405 Commits

Author SHA1 Message Date
Hui c66995df3a Fixes wrong number of args for format in Sprintf call bug in addForeignKey function 2016-01-05 17:02:47 +08:00
Jinzhu 3a9367612e Port changes made in PR #652 2016-01-05 08:34:17 +08:00
Jinzhu e60acad62a include join table name in where conditions to avoid ambiguous column name 2016-01-05 08:05:45 +08:00
Jinzhu ec0aa10bf2 Fix set scanner to a Field 2016-01-04 21:49:04 +08:00
Jinzhu be45d8312e Create index automatically when create table 2016-01-04 19:22:42 +08:00
Jinzhu d1892d3177 Support poiner of Scanner 2016-01-04 18:42:47 +08:00
Jinzhu f330da219c Merge pull request #779 from shenli/master
scope: Catch error for db.Commit()
2016-01-04 17:59:15 +08:00
shenli 499b5b7615 scope: Catch error for db.Commit() 2016-01-04 13:32:35 +08:00
Jinzhu 4c52351b3e Add more tests for belongs to relations with partial customized foreign keys 2016-01-04 12:29:57 +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 28d1eb474b Add test case for one to one relation with customized foreign keys 2016-01-04 08:46:03 +08:00
Jinzhu d87a960248 Test many to many relation with customized column 2016-01-04 08:26:02 +08:00
Jinzhu caeb4040f2 Fix use []byte as condtions 2016-01-03 20:29:46 +08:00
Jinzhu d7237be63c Support poiner of time 2016-01-03 20:27:08 +08:00
Jinzhu 52ac75a29a Use []byte as condtions 2016-01-03 20:23:37 +08:00
Jinzhu 1b1dbc0fab Respect customized sql tag when create join table 2016-01-03 19:47:48 +08:00
Jinzhu b59eaf526e Set Error to Association when some error happend 2016-01-03 17:52:16 +08:00
Jinzhu 2e949b02ae Merge pull request #774 from jinzhu/get_model_struct
Refactor build model struct & relationships
2016-01-03 17:23:23 +08:00
Jinzhu aa55bd3fd2 Add more tests for customized foreign keys for many2many relations 2016-01-03 17:20:24 +08:00
Jinzhu b907500a47 Add test for many2many relations with customized foreign keys 2016-01-03 16:18:51 +08:00
Jinzhu 0f5055471a Keep refactoring get model struct 2016-01-03 15:56:32 +08:00
Jinzhu f53af2a236 Don't preload if has any error 2016-01-03 14:21:21 +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
Jinzhu 934e97b018 Don't need NOT IN conditions when there are no primary keys found 2015-12-30 15:34:56 +08:00
Jinzhu 9a63fb28ba Update README 2015-12-26 20:46:25 +08:00
Jinzhu 9776eea2a2 Update README 2015-12-26 20:28:40 +08:00
Jinzhu c087e6dcc6 Remove unnecessary saving SQL when Append new association 2015-12-26 19:49:31 +08:00
Jinzhu e8fe7c5e34 Update README for Association Mode 2015-12-26 17:13:41 +08:00
Jinzhu a563efdd27 Update association tests 2015-12-26 16:45:53 +08:00
Jinzhu 4c1f03fee3 Don't set foreign key to be null when delete with a wrong relation 2015-12-26 16:19:38 +08:00
Jinzhu 300b74f15f Refactor association Delete 2015-12-26 16:06:53 +08:00
Jinzhu e65f94b287 Fix association Append for polymorphic 2015-12-26 15:20:40 +08:00
Jinzhu c88960b9b0 Add more tests for TestHasOne 2015-12-26 14:26:21 +08:00
Jinzhu 9ed070d386 Fix tests on CI 2015-12-26 14:00:18 +08:00
Jinzhu c23185af54 Refactor association Delete 2015-12-26 00:23:45 +08:00
Jinzhu f6ea3afc8d Refactor association Replace 2015-12-25 23:30:57 +08:00
Jinzhu f13dcd8bc0 Refactor association Replace 2015-12-25 20:43:51 +08:00
Jinzhu 93b512be47 Refactor association Clear, Replace 2015-12-25 19:35:36 +08:00
Jinzhu 4719ee7b1f Add Replace support for has many associations 2015-12-25 19:08:10 +08:00
Jinzhu a00fb4db04 Add Delete support for has many associations 2015-12-25 18:42:26 +08:00
Jinzhu a00cb7432c Update BelongsTo test 2015-12-25 17:52:09 +08:00
Jinzhu 715d7951aa Test HasOne relations for normal foreign key or scanner 2015-12-25 17:36:47 +08:00
Jinzhu affb64b04b Add BelongsTo support for association Clear 2015-12-25 17:32:28 +08:00
Jinzhu c85f00bcd2 Add BelongsTo support for association Delete 2015-12-25 17:09:37 +08:00