import org.simantics.db.common.primitiverequest.PossibleRelatedValueImplied2;
import org.simantics.db.common.procedure.adapter.TransientCacheListener;
import org.simantics.db.common.utils.NameUtils;
+import org.simantics.db.common.utils.Versions;
import org.simantics.db.exception.DatabaseException;
import org.simantics.layer0.Layer0;
import org.simantics.operation.Layer0X;
String componentPrefix = graph.getPossibleRelatedValue(componentType, L0X.HasGeneratedNamePrefix, Bindings.STRING);
if (componentPrefix == null || "".equals(componentPrefix)) {
Layer0 L0 = Layer0.getInstance(graph);
- componentPrefix = graph.getPossibleRelatedValue(componentType, L0.HasName);
- if (componentPrefix == null)
+ String name = graph.getPossibleRelatedValue(componentType, L0.HasName);
+ if (name == null)
componentPrefix = "Entity";
+ else
+ componentPrefix = Versions.getBaseName(name);
}
proposition.append(componentPrefix);
return proposition.toString();