Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
spring-projects-issues opened this issue May 13, 2019 · 0 comments

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented May 13, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants