private boolean duplicateOrderBy(String typeAlias, OrderByBean defaultOrderEntry, OrderByBean userOrder) {
        Objects.requireNonNull(typeAlias);
        Objects.requireNonNull(defaultOrderEntry);
        if (userOrder == null || userOrder.getName() == null) {
            return false;
        }
        return defaultOrderEntry.getName().equalsIgnoreCase(userOrder.getName()) ||
                // Catch cases like "api.foo" vs "foo" where "foo" is implicitly referring to same entity.
                defaultOrderEntry.getName().equalsIgnoreCase(typeAlias + "." + userOrder.getName());
    }
MSSQL issue: if the user provides a sort order that is also in our default sort order list,  size = 2
we may end up with the duplicate "orderBy" clauses, which MSSQL rejects. All other DBs don't seem to care...
manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/AbstractJpaStorage.java