Stephan Peijnik
9601a99a25
Merge f4e9671baff4d5874babadef960480e5a548bd15 into f8377d80bf0d73b981c7ec39b7483776feedf79b
2016-03-04 15:29:28 +00:00
Jinzhu
f8377d80bf
Merge pull request #822 from jseriff/master
...
Remove regex guess on counting query
2016-03-04 21:58:27 +08:00
Jinzhu
e1df3994fb
Merge pull request #861 from sunprophit/Issue-860
...
Issue-860. Preload performance
2016-03-01 07:51:58 +08:00
Pavel Hrechyshkin
b520f4bd1c
Issue-860. Preload performance
2016-02-22 01:09:56 +03:00
Jinzhu
aa45da1542
Preload first before run after find
2016-02-14 21:47:13 +08:00
Jinzhu
77928d8373
Check argument is string or not in HasTable
2016-02-14 14:17:25 +08:00
Jinzhu
3c9d2b1af6
Merge branch 'RichardKnop-bugfix/hastable-string'
2016-02-14 14:14:56 +08:00
Richard Knop
d37d184401
Fixed a nested preload panic bug.
2016-02-14 14:14:32 +08:00
Jinzhu
090272bf25
Merge pull request #846 from RichardKnop/bugfix/preload-panic
...
Fixed a nested preload panic bug.
2016-02-14 14:05:25 +08:00
Richard Knop
f73f7b251f
HasTable now works with table name passed as a string.
...
Before, only HasTable(&Foo) would work but HasTable("foos") would always
return false. This PR fixes that.
2016-02-13 20:28:42 +08:00
Richard Knop
c19412d85a
Fixed a nested preload panic bug.
2016-02-10 23:44:41 +08:00
Jinzhu
0cf369dcff
Fix query IN with empty slice
2016-02-08 19:29:16 +08:00
Jinzhu
7aab3ae861
Merge pull request #836 from lscieux/master
...
Fix a reflection panic with nested preloads
2016-02-08 18:16:09 +08:00
lscieux
369027a6ae
Fix a reflection panic with nested preloads
2016-02-04 21:28:17 +01:00
Jinzhu
d1fcba9bfc
Merge pull request #834 from Xiol/patch-1
...
Fix documentation for Count() function example
2016-02-04 22:35:41 +08:00
Dane
08a740db98
Fix documentation for Count() function examples
...
Count function should pass pointer to struct rather than struct.
2016-02-04 09:23:04 +00:00
Stephan Peijnik
f4e9671baf
Actually check if a foreign key exists, before creating it.
...
Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>
2016-02-03 12:49:40 +01:00
Stephan Peijnik
e5ca672742
Implement conditional generation of foreign keys.
...
For now, support is restricted to MySQL and PostgreSQL, while all other
DBMS default to the old behavior.
Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>
2016-02-03 12:33:51 +01:00
Jinzhu
c7b9acefb7
Merge pull request #823 from taiyangc/readme-typo
...
Fix README typo on Related usage.
2016-01-29 14:56:44 +08:00
Eric Chen
7bb90371e9
Fix README typo on Related usage.
2016-01-26 03:14:05 -08:00
Jason Seriff
3a13eade4e
Remove regex guess on counting query - replace with explicit set on Count() call to fix order by issues
2016-01-25 14:28:02 -06:00
Jinzhu
9739cb853c
Merge pull request #804 from RichardKnop/feature/reflect-fieldbyname-panic-fix
...
Fixed an issue with reflect.Value.FieldByName causing panic
2016-01-18 12:02:59 +08:00
Richard Knop
50fe671928
Fixed an issue with reflect.Value.FieldByName causing panic under certain circumstances.
2016-01-17 23:18:16 +08:00
Jinzhu
211ccf4ea6
Fix using pointer value as foreign key
2016-01-16 11:37:16 +08:00
James Kong
72104c6bf0
Fixes querying with inline map when a value is nil
...
This changes the inline map query build condition to use `IS NULL`
instead of the equality operator when the provided value is `nil`.
2016-01-15 16:38:56 -08:00
Jinzhu
341d047aa7
Rollback to old Unscoped API
2016-01-12 15:27:25 +08:00
Jinzhu
43e9035dad
Fix Association Count with Soft Delete
2016-01-12 13:56:41 +08:00
Jinzhu
801a271d07
Fix Association Count
2016-01-12 12:31:05 +08:00
Jinzhu
ee48d6986c
Update README
2016-01-11 07:28:08 +08:00
Jinzhu
84942c60b8
Include tag settings when clone a StructField
2016-01-08 09:02:01 +08:00
Jinzhu
2392e2a33e
Merge pull request #788 from jcscottiii/fix_polymorphic_test
...
Fix polymorphic test
2016-01-06 23:57:18 +08:00
James C. Scott
195d5993b3
Fix polymorphic test
...
One assertion comment says look for association with dog but the code
still uses cat. This aligns the code to now look at the association of
the dog.
2016-01-06 10:34:42 -05:00
Jinzhu
2f7811c55f
Merge pull request #787 from dolmen/patch-1
...
README: fix typo
2016-01-06 17:41:57 +08:00
Olivier Mengué
27df9104ed
README: fix typo
...
Fix typo in has-one example.
2016-01-06 10:18:23 +01:00
Jinzhu
5e23d7013e
Merge pull request #782 from fengjh/fixes-add-foreign-key-bug
...
Fixes unexpected keyname bug in addForeignKey function
2016-01-05 17:23:25 +08:00
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