Skip to content
Permalink
Browse files

Resolve #862 Use sorted list for model package names (#864)

  • Loading branch information...
zdevwu authored and npurushe committed Apr 3, 2019
1 parent 72e07be commit 3070590c2ef76bb7062570bf9df03cd482db024a
Showing with 4 additions and 2 deletions.
  1. +4 −2 requery-processor/src/main/java/io/requery/processor/EntityProcessor.java
@@ -40,6 +40,7 @@
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Queue;
@@ -268,8 +269,9 @@ private boolean getOption(String key, boolean defaultValue) {

private String findModelPackageName(EntityGraph graph) {
String packageName = "";
Set<String> packageNames = graph.entities().stream().map(
entity -> entity.typeName().packageName()).collect(Collectors.toSet());
List<String> packageNames = graph.entities().stream().map(
entity -> entity.typeName().packageName()).collect(Collectors.toList());
packageNames.sort(null);

if (packageNames.size() == 1) {
// all the types are in the same package...

0 comments on commit 3070590

Please sign in to comment.
You can’t perform that action at this time.