Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

findEntities with multiple conditions does not return entities #490

Description

@pmarius22

Hello, I am testing the findEntities method with multiple match conditions and have found a behaviour which I don't know if it's correct.
I am searching for GlossaryTerm type and having as search condition the properties "displayName" and "name" with MatchCriteria.ANY. "displayName" is mapped for GlossaryTerm but the "name" property is not mapped.
While going through the code with the debugger I noticed that because the "name" property is not mapped it results in having the filter set to InstanceMapping.SearchFilter.NONE which means that no results are returned even though the "displayName" is mapped and there should be results matching that property. Also the filter for "displayName" is computed to InstanceMapping.SearchFilter.SOME.

Is this the correct behaviour? I would have expected to receive some results back matching the "displayName" property.

This is what the searchProperties look like:

primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING);
primitivePropertyValue.setPrimitiveValue("test");
primitivePropertyValue.setTypeName(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getName());
primitivePropertyValue.setTypeGUID(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getGUID());

namePropertyCondition.setProperty("name");
namePropertyCondition.setOperator(PropertyComparisonOperator.LIKE);
namePropertyCondition.setValue(primitivePropertyValue);

displayNamePropertyCondition.setProperty("displayName);
displayNamePropertyCondition.setOperator(PropertyComparisonOperator.LIKE);
displayNamePropertyCondition.setValue(primitivePropertyValue);

searchProperties.setConditions(Arrays.asList(displayNamePropertyCondition, namePropertyCondition));
searchProperties.setMatchCriteria(MatchCriteria.ANY);

Metadata

Metadata

Assignees

No one assigned

    Labels

    functionality-callTo discuss and agree during weekly functionality call(s)questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions