check for ID field
@@ -283,8 +283,10 @@ public class DatastoreImpl implements AdvancedDatastore {
public <T> void ensureIndexes(Class<T> type) {
EntityModel model = mapper.getEntityModel(type);
final IndexHelper indexHelper = new IndexHelper(mapper);
+ if (model.getIdProperty() != null) {
indexHelper.createIndex(getCollection(type), model);
}
+ }
@Override
public <T> Query<T> find(Class<T> type) {
