@Override
protected Morphia createInstance() throws Exception {
Morphia m = new Morphia();
// lightweight wrapper around the JSR303 API Validation Extension
new MorphiaValidation().applyTo(m);
if (mapPackages != null) {
for (String packageName : mapPackages) {
m.mapPackage(packageName, ignoreInvalidClasses);
}