Commit 00a56b1b authored by Matija Obreza's avatar Matija Obreza

Fix: Sort Taxonomy by genus, species, id ASC

parent 8964f2bc
......@@ -23,6 +23,7 @@ import java.util.Set;
import com.google.api.client.util.Lists;
import com.querydsl.core.BooleanBuilder;
import org.apache.commons.lang3.StringUtils;
import org.genesys2.server.model.genesys.QTaxonomy2;
import org.genesys2.server.model.genesys.Taxonomy2;
import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.persistence.Taxonomy2Repository;
......@@ -212,7 +213,7 @@ public class TaxonomyServiceImpl implements TaxonomyService {
if (filter != null) {
predicate.and(filter.buildPredicate());
}
return Lists.newArrayList(taxonomy2Repository.findAll(predicate));
return Lists.newArrayList(taxonomy2Repository.findAll(predicate, QTaxonomy2.taxonomy2.genus.asc(), QTaxonomy2.taxonomy2.species.asc(), QTaxonomy2.taxonomy2.id.asc()));
}
@Override
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment