https://github.com/mongodb/morphia/issues/566