jnfeinstein
794e1ba20b
.Count() should always use ToSnake'd foreign keys.
...
It looks like gorm always uses the snake form of a column by
convention, as seen by searching DBName in scope.go. These counts
were erroring out without the ToSnake'd foreign keys.
Further, the code for has_many and has_one becomes the same (which
makes sense), so I combined the two cases.
2014-11-25 11:47:23 -08:00
Tristan Storch
9bee4239d4
FieldValueByName does now only what it should
...
FieldValueByName in utils.go does now only what it should and has proper errors.
2014-10-01 16:20:12 +02:00
Jinzhu
953c347ba7
Refactor Scope
2014-09-02 19:03:01 +08:00
Jinzhu
90106d82c5
Export Relationship
2014-07-31 14:38:16 +08:00
Jinzhu
ba74a9545b
Make clear works
2014-07-30 22:15:31 +08:00
Jinzhu
5a95050464
Make association replace works
2014-07-30 22:10:12 +08:00
Jinzhu
db3da2c636
Make association Count works
2014-07-30 21:43:53 +08:00
Jinzhu
2356182ea7
Rename joinTable to relationship
2014-07-30 20:59:52 +08:00
Jinzhu
e1e68debdc
improve association
2014-07-30 20:48:36 +08:00
Jinzhu
efd3b7678b
Be able to find many to many relations
2014-07-30 16:22:26 +08:00
Jinzhu
ba95de5c50
Rename relations to associations
2014-07-30 14:30:21 +08:00