Fix bug
This commit is contained in:
parent
972c78fd6e
commit
a0dffb625d
|
@ -71,7 +71,11 @@ func (session *Session) FindAndCount(rowsSlicePtr interface{}, condiBean ...inte
|
||||||
}
|
}
|
||||||
|
|
||||||
// session has stored the conditions so we use `unscoped` to avoid duplicated condition.
|
// session has stored the conditions so we use `unscoped` to avoid duplicated condition.
|
||||||
|
if sliceElementType.Kind() == reflect.Struct {
|
||||||
return session.Unscoped().Count(reflect.New(sliceElementType).Interface())
|
return session.Unscoped().Count(reflect.New(sliceElementType).Interface())
|
||||||
|
}
|
||||||
|
|
||||||
|
return session.Unscoped().Count()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (session *Session) find(rowsSlicePtr interface{}, condiBean ...interface{}) error {
|
func (session *Session) find(rowsSlicePtr interface{}, condiBean ...interface{}) error {
|
||||||
|
|
Loading…
Reference in New Issue