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
fix: limit=0 results (#5735) #5736
Conversation
Here is the link for the pull request to fix the sqlite module. |
Here is the link for the pull request to fix the sqlserver module. |
Please let me know if there is anything else that you need from me to move this pull request forward as it is preventing some of our services from upgrading to gorm 2. Also, given that these fixes reside in different modules it's unclear to me as to how to make the build pass. |
@@ -4,7 +4,7 @@ import "strconv" | |||
|
|||
// Limit limit clause | |||
type Limit struct { | |||
Limit int |
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.
This is a breaking change.
@@ -8,18 +8,26 @@ import ( | |||
) | |||
|
|||
func TestLimit(t *testing.T) { | |||
limit0 := 0 |
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.
test cases should not be changed unless for a reason that's good enough, this is not good enough.
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.
+1
GORM Introduced a breaking change here: go-gorm/gorm#5736 This PR makes changes to mitigate that issue. A simmilar aproach was taken here: go-gorm/sqlserver#70 go-gorm/sqlite#114
What did this pull request do?
User Case Description