
this fixes the logic of handling empty slice of int family in a query i.e something linke `[]int64{}` This code snipped doesn't look like it was intended to be this way ``` if reflect.ValueOf(value).Len() > 0 { str = fmt.Sprintf("(%v.%v NOT IN (?))", scope.QuotedTableName(), scope.Quote(primaryKey)) clause["args"] = []interface{}{value} } return "" ``` The `return ""` is always guaranteed to be executed regardless of whether the length of value is greater than 0. I believe the intended behavior is to return `""` when the length of value is zero.
GORM
The fantastic ORM library for Golang, aims to be developer friendly.
Overview
- Full-Featured ORM (almost)
- Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism)
- Callbacks (Before/After Create/Save/Update/Delete/Find)
- Preloading (eager loading)
- Transactions
- Composite Primary Key
- SQL Builder
- Auto Migrations
- Logger
- Extendable, write Plugins based on GORM callbacks
- Every feature comes with tests
- Developer Friendly
Getting Started
- GORM Guides jinzhu.github.com/gorm
Upgrading To V1.0
Supporting the project
Author
jinzhu
Contributors
https://github.com/jinzhu/gorm/graphs/contributors
License
Released under the MIT License.
Languages
Go
99.9%
Shell
0.1%