Vladislav Fursov
e8c14bd1b3
Fixed a bug when joining multiple tables with the same fields and where on the same field.
2016-08-09 14:28:43 +09:00
Jinzhu
ca46038cb4
Fix preload duplicates has many related objects
2016-07-10 21:34:37 +08:00
Jinzhu
c1c4f9f86e
Add ORDER BY sql expression support
2016-06-28 11:15:42 +08:00
Michael Goff
e7f00bd2cd
Add support for multiple indexes seperated by commas for issue #884
2016-06-15 16:06:22 -07:00
Nikola Kovacs
6eb73ae654
Fix too long foreign key names in mysql.
...
The dialect must define its own foreign key generator method.
The previous default is available as a method on gorm.DefaultForeignKeyNamer
and can be embedded in other dialects.
The mysql dialect uses the first 24 characters plus an sha1 hash of the
full key name if the key name is more than 64 characters.
2016-05-22 00:13:26 +02:00
Jinzhu
4786e830d6
Fix create join table
2016-05-09 22:32:33 +08:00
Jinzhu
5174cc5c24
Only get address from non pointer when call method, fix #912
2016-04-04 22:49:28 +08:00
Jinzhu
9fd05d1bad
Print warning message when using unaddressable value with Update
2016-04-04 21:33:11 +08:00
Jinzhu
c49e68fac2
Make Update works with unaddressable value
2016-04-04 20:57:42 +08:00
Jinzhu
2530dcbccd
Quote order column name, fix #918
2016-03-23 10:29:52 +08:00
Jinzhu
83002c4d5f
Include default search attributes when query with Join, close #906
2016-03-14 08:05:45 +08:00
Jinzhu
7c43d9fc36
Fix scan columns with same name
2016-03-10 17:35:19 +08:00
Jinzhu
846a2d401a
Fix scan columns with same name
2016-03-10 17:13:48 +08:00
Jinzhu
8de97c2883
Refactor Scope updatedAttrsWithValues
2016-03-09 16:45:53 +08:00
Jinzhu
a0aa21aec5
Refactor
2016-03-08 22:29:58 +08:00
Jinzhu
d08894cd69
Rename test files
2016-03-08 22:00:15 +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
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
d92c5db9e7
Refactor dialect
2016-01-19 13:11:11 +08:00
Jinzhu
e159ca1914
Refactor dialect
2016-01-18 20:32:52 +08:00
Jinzhu
896ee534e2
Add indirect method
2016-01-18 12:20:27 +08:00
Jinzhu
19e9bd29e3
Refactor Scope CallMethod
2016-01-17 21:43:20 +08:00
Jinzhu
e38b1e0948
Remove uncessary NeedPtr method
2016-01-17 17:12:19 +08:00
Jinzhu
4f84bf0d94
Hide method QuoteIfPossible
2016-01-17 16:37:17 +08:00
Jinzhu
31366f388f
Remove uncessary method CallMethodWithErrorCheck for Scope
2016-01-17 16:14:14 +08:00
Jinzhu
8d716be896
Fix some go vet/lint reports
2016-01-15 21:16:48 +08:00
Jinzhu
d9229c5a7b
Extract method Scan from rows
2016-01-13 16:53:11 +08:00
Jinzhu
d53f5cf6dd
Rename scope.Trace to trace
2016-01-13 16:00:08 +08:00
shenli
499b5b7615
scope: Catch error for db.Commit()
2016-01-04 13:32:35 +08:00
Jinzhu
92e0809716
Don't save associations if has any error happened
2015-08-18 11:09:03 +08:00
Jinzhu
018a7e69ec
Handle DB error in callbacks
2015-08-17 16:38:01 +08:00
Jinzhu
309740983e
Add Errors
2015-08-14 11:04:05 +08:00
Jinzhu
1a07673e97
Fix can't call callbacks for embedded pointers
2015-08-10 12:51:12 +08:00
Jinzhu
fd9e42655f
Handle children db's Error in callbacks
2015-08-07 16:35:48 +08:00
Jinzhu
8a88d665d5
Add QuoteIfPossible for Scope
2015-08-01 09:25:06 +08:00
Jay Taylor
923ca15b6f
Surface errors emitted by `RowsAffected'.
2015-07-02 12:06:06 -07:00
Jinzhu
5ddca7c427
Fix table name for association
2015-06-30 10:39:29 +08:00
Jinzhu
308c96ee4c
Add PrimaryFields
2015-06-29 18:04:15 +08:00
Jinzhu
0b8c9f29a9
Find Field by db name also
2015-06-04 12:10:14 +08:00
Jinzhu
b96ca76e59
Set table name handler
2015-05-27 12:19:48 +08:00
Jinzhu
dc55c59b84
Fix use SQL as table name
2015-05-19 10:43:32 +08:00
Jinzhu
5af077cd2d
Handle []string for Select
2015-05-11 15:17:35 +08:00
Jinzhu
055bf79f8b
Don't call method if value is nil
2015-04-21 11:24:48 +08:00
li3p
f9bd6bcc64
look up the Field.Name at Scope.SetColumn
2015-04-16 14:28:55 +08:00
li3p
7966cde514
look up the Field.Name at Scope.SetColumn
2015-04-16 14:08:13 +08:00
Jinzhu
e2eef50fb4
Add SetTableNameHandler
2015-04-08 14:56:03 +08:00
Jinzhu
b9a39be9c5
Add Tabler
2015-04-08 11:36:01 +08:00
Jay Taylor
ab48cd222a
`UpdateColumns(...)` no longer triggers save of associated records.
2015-03-28 14:15:12 -07:00