greenlaw110/play-morphia — pull request #42 by dbusch (2011-10-15 15:58:55+00:00)
Title: Supporting multiple mongo backends

I've modified the plugin so that it can support configuring multiple mongo backends. You can now annotate your model classes to declare in which backend the collection lives. The value given in the annotation matches up with a set of configuration settings in the application.conf file.

Issues:
1. Even with my testing, I'm not 100% certain I haven't broken some key assumptions about what the plugin is supposed to do.

2. I had to modify the public api of the plugin. The behavior and method signature of some public static methods were change so its very likely this version is not backwards compatible for some users
* public static Datastore ds(String name) in MorphiaPlugin was rewritten

3. The plugin has support for using GridFS, mongo's blob storage mechanism. Due to how this feature was implemented, blob storage can only be supported on a single mongo backend even though multiple instances may be configured.