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

when collecting index definitions, look at the parent classes as well… #1102

Closed
wants to merge 3 commits into from

Conversation

evanchooly
Copy link
Member

… as the nested types for definitions.

don't create indexes when the mapped class is abstract.

fixes #1086

… as the nested types for definitions.

don't create indexes when the mapped class is abstract.

fixes #1086
Copy link

@rozza rozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

One question/concern about a removed assert

List<DBObject> indexInfo = getDs().getCollection(IndexedClass.class)
.getIndexInfo();
assertEquals("Should have 5 indexes", 5, indexInfo.size());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come this check was removed - shouldn't there be a fixed number of indexes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well my initial thought was we'd catch any extra indexes in the loop but that won't catch missing indexes so I'll restore that check.

@@ -129,22 +131,27 @@ public void createIndex() {
assertEquals(parse("{ 'nest.name' : 1} "), dbObject.get("key"));
} else if (name.equals("searchme")) {
assertEquals(parse("{ 'text' : 10 }"), dbObject.get("weights"));
} else if (name.equals("indexName_1")) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checkstyle probably is complaining about the "

@evanchooly evanchooly closed this Dec 8, 2016
@evanchooly evanchooly deleted the issue1086 branch December 8, 2016 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants