Commit Graph

2186 Commits

Author SHA1 Message Date
Jinzhu 3b2c4b3608 Fix insert with default value for mysql 2018-02-12 17:39:34 +08:00
Jinzhu 8005321a1c Allow table option when DropTable, close #1514 2018-02-12 14:49:24 +08:00
Jinzhu 30adc80edc Test customize data type for primary key 2018-02-12 13:20:55 +08:00
Jinzhu 7e2bb3d7fa Allow customize table name when creating index, close #1656 2018-02-12 11:56:51 +08:00
Jinzhu 49934ff3bf Call DefaultTableNameHandler for JoinTableHandler's table 2018-02-12 09:43:28 +08:00
Jinzhu c54d23473c Add IsRecordNotFoundError method 2018-02-12 09:38:16 +08:00
Jinzhu 0cc4d47ce5 Merge branch 'eatigo-master' 2018-02-12 00:06:50 +08:00
Jinzhu 7a8c2bbff8 Refactor build SQL condition 2018-02-12 00:06:31 +08:00
Jinzhu 86c04795b7 Port PR #1655 to Not query builder 2018-02-11 15:52:52 +08:00
andrew 8d66eb4926 fixed wrong param substitution order 2018-02-11 14:58:22 +08:00
Jinzhu 3c70f83833 Fix query test 2018-02-11 13:57:59 +08:00
Jinzhu 6450b862e9 Merge branch 'matematik7-fea_change1' 2018-02-11 13:41:54 +08:00
Jinzhu 46269198a4 Refactor PR #1569 2018-02-11 13:41:46 +08:00
matematik7 36043ad905 Fix for quoted column names and add test 2018-02-11 13:11:54 +08:00
matematik7 841ea1bde5 Do not always override select on pluck 2018-02-11 13:11:54 +08:00
Jinzhu 4c93473b2d Merge branch 'readdle-fix-valuer' 2018-02-11 12:48:19 +08:00
Jinzhu c503108f83 Refactor fix valuer 2018-02-11 12:48:08 +08:00
Viktor Nikolaiev ba3e6201c7 fixed issue with null values in where conditions 2018-02-11 09:19:57 +08:00
Viktor Nikolaiev fce49136e8 fixed golint issues 2018-02-11 09:19:57 +08:00
Viktor Nikolaiev 3b6d790e93 Made it possible to implement driver.Valuer for byte slices 2018-02-11 09:19:57 +08:00
Jinzhu fd15156d39 Fix Count in mssql for SQL with group 2018-02-11 09:16:10 +08:00
Jinzhu 85774eb9da
Merge branch 'master' into master 2018-02-10 22:25:28 +08:00
Jinzhu cb7c41e0b6 Add more tests for self-referencing many2many relationship 2018-02-10 22:14:18 +08:00
Jinzhu 44b9911f51 Refactor self referencing m2m support 2018-02-10 21:21:50 +08:00
Nathan Osman 8e7d807ebf Allow name of column to be customized to support self-referencing many2many fields. 2018-02-10 21:21:50 +08:00
Emil Davtyan c0359226dc Removed unnecessary cloning. (#1462)
`NewScope` clones `DB` no need to chain a call to clone with `NewScope`.
2018-02-10 19:31:55 +08:00
Jinzhu c6ce739b2a Convert auto_increment's value to lower case when checking its value 2018-02-10 19:25:58 +08:00
Jinzhu 2940c553eb Add DB setting gorm:association_save_reference 2018-02-10 18:01:41 +08:00
Jinzhu b2b568daa8 Add tag association_autoupdate, association_autocreate, association_save_reference support 2018-02-10 17:34:02 +08:00
Jinzhu 43dc867644 Allow save association relations w/o saving association 2018-02-10 17:34:02 +08:00
Ezequiel Muns 63cb513b49 Tests for saving foreign key when save_associations:false 2018-02-10 17:34:02 +08:00
joe-at-startupmedia 9f409820df Formatting code with gomt 2018-02-10 17:34:02 +08:00
joe-at-startupmedia 9235b47ea2 Allows foreign keys to be saved without saving the assoication when specified #1628 2018-02-10 17:34:02 +08:00
Jess Smith aa3fd6de13 Sort column names before generating SQL in `DB.UpdateColumns` (#1734) 2018-02-10 14:26:01 +08:00
Jinzhu 21fb3ae1fe Simplify GitHub templates 2018-02-10 13:55:11 +08:00
Giuseppe 706b8f55da Use brackets for quoting (#1736) 2018-02-10 12:28:01 +08:00
Jinzhu 2e5d98a420 Update wercker.yml 2018-02-10 11:45:38 +08:00
Jinzhu e0f9087c8d Setup test env 2018-02-10 11:07:07 +08:00
Jinzhu ae509ab237 Port AUTO_INCREMENT false support to mssql 2018-02-10 08:30:05 +08:00
Jinzhu bec55f84c6 Merge branch 'WingGao-wing' 2018-02-10 08:24:51 +08:00
Jinzhu 2c68f695c3 Set AutoIncrement to false with tag 2018-02-10 08:24:39 +08:00
Wing Gao 97495a5e40 Add new tag "not_auto_increment" to set a column can auto increase or not 2018-02-10 08:18:35 +08:00
Jinzhu 77eb925ea0 Refactor preloading many2many for auto preload 2018-02-10 00:07:16 +08:00
Geoff Baskwill ec72a4cb6b Call Query callback chain when preloading many2many (#1622)
When using `Preload` on a `many2many` association, the
`Query` callback chain was not being called. This made
it difficult to write a plugin that could reliably get
called regardless of how objects were being queried.

Now `handleManyToManyPreload` will call the `Query`
callback chain for each object that is retrieved by
following the association.

Since the data has already been read by the
`handleManyToManyPreload` method, a new scope setting
called `gorm:skip_queryCallback` is set to `true` before
calling the callbacks. Callbacks can check for the
presence of this setting if they should not be run; the
default `queryCallback` is an example of this case.

Fixes jinzhu/gorm#1621.
2018-02-09 23:22:53 +08:00
Jinzhu 2bb1b7c83e Merge branch 'miya-masa-master' 2018-02-09 23:19:35 +08:00
Jinzhu 8d4e3e5a83 Use tag PRECISION to set time's precision for mysql 2018-02-09 23:18:47 +08:00
miyauchi ae696d051f corresponds timestamp precision for mysql 2018-02-09 23:05:15 +08:00
Jinzhu 89a726ce5d Move ModifyColumn implemention to Dialect 2018-02-09 22:58:34 +08:00
Jinzhu e9309d361f Fix build exception 2018-02-09 22:34:59 +08:00
Amit Yadav 0e1cb6ece9 Add support to remove foreign key constraints (#1686) 2018-02-09 22:20:26 +08:00