google-code-export / morphia

Automatically exported from code.google.com/p/morphia
1 stars 0 forks source link

ensureIndexes without validation #382

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
ensureIndexes by default calls QueryImpl.parseFieldsString( ... ) with the 
validate flag set to true. As suggested in the group post (mentioned below), 
this could be fixed by incrementing the annotations.

The Index interface should be incremented with the following:

boolean validate() default true;

And the DatastoreImpl should have:

ensureIndexes(MappedClass mc, boolean background, ArrayList<MappedClass> 
parentMCs, ArrayList<MappedField> parentMFs)

Ammended to use the new validate() method as follows:

BasicDBObject fields = QueryImpl.parseFieldsString(index.value(), 
mc.getClazz(), mapr, index.validate());

The group post can be found here:

http://groups.google.com/group/morphia/browse_thread/thread/c36665a26c12e600

Original issue reported on code.google.com by agiann...@kioos.com on 23 Feb 2012 at 2:33

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1806.

Original comment by scotthernandez on 23 Feb 2012 at 5:19

GoogleCodeExporter commented 9 years ago

Original comment by scotthernandez on 23 Feb 2012 at 5:23