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=29585440e1f38ed0f5457001c4702521ef031a3d;hp=ad48d1f2f809ab89e48a545da83ae88f26e094ca;hpb=3c524553c98b56075d854f355bc7bab2e3ae17f7;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 ad48d1f2f..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