-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable gorm filtering by Identifier #98
Conversation
@@ -15,7 +18,7 @@ import ( | |||
// according to obj GORM model. If fieldPath cannot be found in obj then original fieldPath is returned | |||
// to allow tables joined by a third party. | |||
// If association join is required to resolve the field path then it's name is returned as a second return value. | |||
func HandleFieldPath(fieldPath []string, obj interface{}) (string, string, error) { | |||
func HandleFieldPath(ctx context.Context, fieldPath []string, obj interface{}) (string, string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need context here?
gorm/utilities.go
Outdated
@@ -6,7 +6,10 @@ import ( | |||
"reflect" | |||
"strings" | |||
|
|||
"context" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check fmt and organize imports properly.
@@ -10,7 +11,7 @@ import ( | |||
// - association table name | |||
// - source join keys | |||
// - target join keys | |||
func JoinInfo(obj interface{}, assoc string) (string, []string, []string, error) { | |||
func JoinInfo(ctx context.Context, obj interface{}, assoc string) (string, []string, []string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we need context here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix imports
Breaking changes: