Nick Sarbicki
d7fa7d0859
Fixing go get error
...
Get this on install:
../../jinzhu/gorm/utils.go:137: syntax error: unexpected range, expecting {
../../jinzhu/gorm/utils.go:147: non-declaration statement outside function body
../../jinzhu/gorm/utils.go:148: syntax error: unexpected }
2016-07-16 14:14:46 +01:00
Jinzhu
b507cdf93d
Expose current database name API
2016-07-11 21:37:44 +08:00
Jinzhu
613c065569
Merge branch 'RichardKnop-feature/fix-preload-duplicates'
2016-07-10 21:34:49 +08:00
Jinzhu
ca46038cb4
Fix preload duplicates has many related objects
2016-07-10 21:34:37 +08:00
Richard Knop
24501a3c1a
Fixed bug when preload duplicates has many related objects.
2016-07-09 18:51:38 +08:00
Jinzhu
3324ab2063
Merge pull request #1075 from cdevienne/fix_autoincrement
...
Fix autoincrement
2016-07-05 06:36:50 +08:00
Jinzhu
c1c4f9f86e
Add ORDER BY sql expression support
2016-06-28 11:15:42 +08:00
Jinzhu
321d10b67b
Fix broken tests for postgres
2016-06-24 07:48:03 +08:00
Jay Taylor
1485f4bce9
Use validated interface{} for limit/offset values to ensure values greater than
...
max 32-bit integer are addressable, and in a backwards-compatible way.
2016-06-23 06:29:51 -07:00
Christophe de Vienne
328fe672c8
Test AUTO_INCREMENT only on postgres
...
Only the postgres dialect handles AUTO_INCREMENT on non-primary key.
So we skip the auto increment test for other dialects.
The mysql case is a little trickier because the simple presence of the
'AUTH_INCREMENT' tag produces a faulty 'CREATE TABLE' statement. Hence
we need to remove it when present.
2016-06-20 16:00:38 +02:00
Christophe de Vienne
608fd976c4
Fix auto_increment on postgres database.
2016-06-20 15:00:19 +02:00
Jinzhu
caa792644c
Include model value when preloading many2many relations to enable row query callbacks
2016-06-17 18:18:46 +08:00
Jinzhu
18917d1f3e
Merge pull request #1028 from nkovacs/wercker
...
Wercker postgres and mysql
2016-06-16 18:29:11 +08:00
Jinzhu
6ef2a539bd
Fix test
2016-06-16 18:18:00 +08:00
Jinzhu
61f50a429a
Fix preload has one relations
2016-06-16 17:58:25 +08:00
Jinzhu
277b4e93b6
Merge pull request #1013 from girokon/m2m_preload_issue
...
fix m2m nested preload
2016-06-16 16:41:34 +08:00
Jinzhu
cf3f9927ae
Merge pull request #1072 from jinzhu/revert-1064-jay/limit-offset
...
Revert "Use int64 for limit/offset values to ensure values > 32-bit int are addressable."
2016-06-16 16:32:24 +08:00
Jinzhu
f926dd9f9f
Revert "Use int64 for limit/offset values to ensure values > 32-bit int are addressable."
2016-06-16 16:31:50 +08:00
Jinzhu
8117553fcb
Merge pull request #1071 from thephred/multiple_indexes
...
Add support for multiple indexes seperated by commas for issue #884
2016-06-16 08:50:36 +08:00
Jinzhu
300edb5bca
Merge pull request #1064 from jaytaylor/jay/limit-offset
...
Use int64 for limit/offset values to ensure values > 32-bit int are addressable.
2016-06-16 08:48:43 +08:00
Michael Goff
e7f00bd2cd
Add support for multiple indexes seperated by commas for issue #884
2016-06-15 16:06:22 -07:00
Jay Taylor
9b0fb2feb9
Use int64 for limit/offset values to ensure values greater than max 32-bit
...
integer are addressable.
2016-06-08 17:03:22 -07:00
Jinzhu
bf0e236078
Fix get default value from blank primary field
2016-06-02 11:06:44 +08:00
Jinzhu
dca5e54f8b
Merge pull request #1038 from RichardKnop/bugfix/preload-panic
...
Fixed an occurrence of a panic while preloading non existent fields.
2016-06-01 23:10:28 +08:00
Jinzhu
09427a07b2
Merge pull request #1052 from stroborobo/fix-polymorphic-preload
...
Add support for polymorphic preload
2016-06-01 22:51:20 +08:00
Jinzhu
2631d6745c
Merge pull request #1046 from andreynering/sqlite-testing-windows
...
Allow run tests for SQLite on Windows
2016-06-01 22:43:58 +08:00
Björn
fcf8dd4e23
Add support for polymorphic preload
...
Fixes #1051
2016-06-01 13:46:45 +02:00
Andrey Nering
7248671c9a
Allow run tests for SQLite on Windows
2016-05-28 13:49:32 -03:00
Richard Knop
8dfcab0f7f
Fixed an occurence of a panic while preloading non existent fields.
2016-05-24 00:54:53 +08:00
Jinzhu
27522453de
Merge pull request #1031 from nkovacs/add-foreign-key-panic-fix
...
fix panic in AddForeignKey on mysql dialect
2016-05-22 19:10:33 +08:00
Nikola Kovacs
7983fc6269
fix panic in AddForeignKey on mysql dialect
2016-05-22 09:58:37 +02:00
Jinzhu
4c9c024939
Merge pull request #1029 from nkovacs/mysql-foreign-key-length-fix
...
Mysql foreign key length fix
2016-05-22 08:00:40 +08:00
Nikola Kovacs
6fca4ec9fe
Add wercker.yml with postgres and mysql tests
2016-05-22 01:59:25 +02: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
Nikola Kovacs
58ce6153e2
don't test AddForeignKey on sqlite
2016-05-21 23:19:41 +02:00
Nikola Kovacs
ed9cfac496
add failing test for long foreign keys in mysql
2016-05-21 19:12:02 +02:00
Igor Noskov
13ac0839c4
fix m2m nested preload
2016-05-12 14:48:08 +06:00
Jinzhu
57c72125b3
Merge pull request #1001 from stroborobo/assoc-error
...
association: dont execute Append/Replace/Delete if Error already present
2016-05-09 22:47:58 +08:00
Jinzhu
0fd2fd66d5
Refactor handleHasManyPreload
2016-05-09 22:42:07 +08:00
Jinzhu
4786e830d6
Fix create join table
2016-05-09 22:32:33 +08:00
Dirk-Jan
d02c2a37ea
Improved preload m2m performance
2016-05-09 14:24:53 +02:00
Björn
f159fa3d74
association: dont execute Append/Replace/Delete if Error already present
2016-05-06 14:10:43 +02:00
Jinzhu
bf413d67d3
Merge pull request #959 from vibhavp/master
...
Fix postgres' HasForeignKey
2016-05-04 21:22:04 +08:00
Jinzhu
34482e028f
Update README
2016-05-04 21:13:24 +08:00
Jinzhu
1073563f1e
Merge pull request #987 from moberemk/patch-1
...
Properly quotes column names in post-insert SELECT
2016-05-04 21:04:23 +08:00
Jinzhu
c669e4b791
Set AUTO_INCREMENT if field is an auto increment field
2016-05-04 10:37:31 +08:00
Mark Oberemk
3b85ddcc9a
Properly quotes column names in post-insert SELECT
...
This commit closes #979 by fixing the post-insert SELECT call
2016-05-02 12:25:04 -04:00
Jinzhu
465f8ea05b
Fix ignore fields
2016-05-02 19:34:11 +08:00
Vibhav Pant
e38e096ca0
Fix postgres' HasForeignKey
2016-04-11 18:48:39 +05:30
Jinzhu
5174cc5c24
Only get address from non pointer when call method, fix #912
2016-04-04 22:49:28 +08:00