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

IndexInfo.partialFilterExpression should be null (not an empty String) when undefined [DATAMONGO-2170] #3033

Closed
spring-projects-issues opened this issue Dec 14, 2018 · 0 comments
Assignees
Labels
in: core type: bug

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Dec 14, 2018

danielFesenmeyer opened DATAMONGO-2170 and commented

In a persistence test, I check whether a MongoDB index has been correctly initialized. For this purpose, I like to use the IndexInfo class and its equals-method. But this does not work currently, because the expected index created by me has a partialFilterExpression of null, but the actual one loaded from MongoDB has a partialFilterExpression of "". As a workaround, I now compare field by field, ignoring partialFilterExpression.

I would suggest to set partialFilterExpression to null (instead of "") when it is not defined by the MongoDB index.

This is the affected line of code: IndexInfo.java#L111


Referenced from: pull request #629

Backported to: 2.1.4 (Lovelace SR4), 2.0.13 (Kay SR13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: bug
Projects
None yet
Development

No branches or pull requests

2 participants