Merge 7afe504a13adabd887e7243859305ddefd318522 into 9acaa33324bbcc78239a1c913d4f1292c12177b9

This commit is contained in:
lscieux 2017-05-11 14:35:39 +00:00 committed by GitHub
commit e336bb8c2c

View File

@ -281,7 +281,8 @@ func (s *DB) Last(out interface{}, where ...interface{}) *DB {
// Find find records that match given conditions // Find find records that match given conditions
func (s *DB) Find(out interface{}, where ...interface{}) *DB { func (s *DB) Find(out interface{}, where ...interface{}) *DB {
return s.clone().NewScope(out).inlineCondition(where...).callCallbacks(s.parent.callbacks.queries).db newScope := s.clone().NewScope(out)
return newScope.Set("gorm:order_by_primary_key", "ASC").inlineCondition(where...).callCallbacks(s.parent.callbacks.queries).db
} }
// Scan scan value to a struct // Scan scan value to a struct