Project

General

Profile

Bug #4009 » 0001-Retain-sort-when-keepColumns-is-true-on-setQuery.patch

Bruce Toll, 04/26/2015 08:14 PM

View differences:

src/Wt/Dbo/QueryModel
mutable Query<Result> query_;
int queryLimit_, queryOffset_, batchSize_;
mutable std::string sortOrderBy_;
mutable int cachedRowCount_;
mutable int cacheStart_;
src/Wt/Dbo/QueryModel_impl.h
query_ = query;
fields_ = query_.fields();
columns_.clear();
sortOrderBy_.clear();
reset();
} else {
invalidateData();
query_ = query;
fields_ = query_.fields();
if (!sortOrderBy_.empty()) {
query_.orderBy(sortOrderBy_);
}
dataReloaded();
}
}
......
invalidateData();
query_.orderBy(createOrderBy(column, order));
sortOrderBy_ = createOrderBy(column, order);
query_.orderBy(sortOrderBy_);
cachedRowCount_ = rc;
dataReloaded();
(2-2/2)