X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Futil%2FModelTransferableGraphSource.java;h=a39e336d9903f39a1b33fba30eed90ef6dc07a6e;hb=refs%2Fchanges%2F66%2F1266%2F1;hp=cbd3130eea6d737f2c431b685e47f6c306576399;hpb=32c804755176db2bb20f46f6a69a418c46d458f5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java index cbd3130ee..a39e336d9 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java @@ -390,11 +390,14 @@ public class ModelTransferableGraphSource implements TransferableGraphSource { // Declare internal and external roots for(RootSpec r : configuration.roots) { - Resource type = graph.getPossibleType(r.resource, L0.Entity); - if(type == null) type = L0.Entity; + String typeId = r.type; + if (typeId == null) { + Resource type = graph.getPossibleType(r.resource, L0.Entity); + typeId = type != null ? graph.getURI(type) : Layer0.URIs.Entity; + } procedure.execute(new Identity( state.ids.get(support.getTransientId(r.resource)), - new Root(r.name, graph.getURI(type)))); + new Root(r.name, typeId))); } for(int i = 0; i < state.externals.size() ; i++) {