]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/TGRepresentationUtils.java
Import/export changes. A load.
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / TGRepresentationUtils.java
index 82c20514c1aa858f625f89e7c0d028be3a9829cf..ffa39974315a1a06b50c57aada1816ae2677130e 100644 (file)
@@ -22,6 +22,7 @@ import org.simantics.db.Statement;
 import org.simantics.db.common.request.PossibleIndexRoot;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.layer0.adapter.impl.EntityInstances.QueryIndex;
+import org.simantics.db.layer0.util.ConsistsOfProcess.InternalEntry;
 import org.simantics.db.layer0.util.DomainProcessor3.ExclusionDecision;
 import org.simantics.layer0.Layer0;
 import org.simantics.scl.runtime.function.Function1;
@@ -62,8 +63,9 @@ public class TGRepresentationUtils {
                         return new GUIDExclusionFunction(graph);
 
                     // The root is OK - check everything beneath
-                    for(Resource part : ConsistsOfProcess.walk(graph, Collections.singleton(r), Collections.emptySet(), true)) {
-                        if(findByIdentifier(graph, targetRoot, part))
+                    List<InternalEntry> entries = ConsistsOfProcess.walk(graph, null, Collections.singleton(r), Collections.emptySet(), true); 
+                    for(InternalEntry entry : entries) {
+                        if(findByIdentifier(graph, targetRoot, entry.resource))
                             return new GUIDExclusionFunction(graph);
                     }
                 }