Skip to content

Enable SetIsSubset to be used for filtering condition in projection [DATAMONGO-2274] #3132

Open
@spring-projects-issues

Description

@spring-projects-issues

Yaakov Chaikin opened DATAMONGO-2274 and commented

Currently, this is what's required:

and("props")
  .filter("prop", context -> 
   new Document("$setIsSubset", Arrays.asList("$$prop.valueSet", myList)))
  .as("props")

There is no way to use SetIsSubset in this scenario because while SetIsSubset.arraySetSet(String arrayReference) works to point to the sub-property off of the filter (i.e., prop.valueSet), there is no way to do this:

SetIsSubset
  .arraySetSet(String arrayReference)

  // This is not possible. Expects AggregationExpression or document property reference as array
  .isSubsetOf(List<String> arrayToCompareTo)

 


No further details from DATAMONGO-2274

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions