-
Notifications
You must be signed in to change notification settings - Fork 456
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
Conversation
… as the nested types for definitions. don't create indexes when the mapped class is abstract. fixes #1086
There was a problem hiding this 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()); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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")) { |
There was a problem hiding this comment.
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 "
… as the nested types for definitions.
don't create indexes when the mapped class is abstract.
fixes #1086