Removed DESC keyword from several ORM Queries

In order to better support non-relational DBs that do not support
sorting in a descending order, I have removed the DESC keyword from
several of the ORM queries in which is was present.

Change-Id: Iac9cbc43a62e7e652f721cacf223e8161eb4a280
This commit is contained in:
Jeff Schumacher
2010-05-28 16:11:38 -07:00
parent 2366d781b3
commit 611e4c1520
4 changed files with 24 additions and 8 deletions

View File

@@ -291,8 +291,12 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook {
ContributorAgreement bestCla = null;
OUTER: for (AccountGroup.Id groupId : currentUser.getEffectiveGroups()) {
for (final AccountGroupAgreement a : db.accountGroupAgreements().byGroup(
groupId)) {
final List<AccountGroupAgreement> temp =
db.accountGroupAgreements().byGroup(groupId).toList();
Collections.reverse(temp);
for (final AccountGroupAgreement a : temp) {
final ContributorAgreement cla =
db.contributorAgreements().get(a.getAgreementId());
if (cla == null) {
@@ -306,8 +310,12 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook {
}
if (bestAgreement == null) {
for (final AccountAgreement a : db.accountAgreements().byAccount(
currentUser.getAccountId()).toList()) {
final List<AccountAgreement> temp =
db.accountAgreements().byAccount(currentUser.getAccountId()).toList();
Collections.reverse(temp);
for (final AccountAgreement a : temp) {
final ContributorAgreement cla =
db.contributorAgreements().get(a.getAgreementId());
if (cla == null) {