X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fservices%2FCaseInsensitiveComponentFunctionNamingStrategy.java;h=d5a2b92a42306f466bd4d94a2f00dd4de536e0e8;hb=b055bfb36cca301ceed0591028d245e152c8c32d;hp=feef9c8992fce52eec3e4417e45897762bf06b03;hpb=1dfeb7d5c49b1391cd9d877e1eddab18995cb151;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/services/CaseInsensitiveComponentFunctionNamingStrategy.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/services/CaseInsensitiveComponentFunctionNamingStrategy.java index feef9c899..d5a2b92a4 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/services/CaseInsensitiveComponentFunctionNamingStrategy.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/services/CaseInsensitiveComponentFunctionNamingStrategy.java @@ -27,6 +27,7 @@ import org.simantics.db.common.request.PossibleIndexRoot; import org.simantics.db.common.request.UnaryRead; import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.genericrelation.Dependencies; import org.simantics.db.layer0.genericrelation.IndexQueries; import org.simantics.db.service.GraphChangeListenerSupport; import org.simantics.layer0.Layer0; @@ -45,7 +46,7 @@ import gnu.trove.set.hash.THashSet; * *
* The type of the function is expected to be:
- * ReadGraph => Resource -> String -> Integer -> List<Map<String,Object>>
+ * ReadGraph => Resource -> String -> Integer -> List<Resource>
*
* @author Tuukka Lehtonen
*
@@ -135,7 +136,7 @@ public class CaseInsensitiveComponentFunctionNamingStrategy extends ComponentNam
synchronized (this) {
- String search = "Name:" + lowercaseName + "*";
+ String search = IndexQueries.escapeTerm(Dependencies.FIELD_NAME_SEARCH, lowercaseName, true) + "*"; //$NON-NLS-1$
@SuppressWarnings("unchecked")
List