Hi Uwe,
Thanks for your feature requests and input. Really good stuff.
I agree that this feature would be quite good. At the moment we're
really just doing Class.forName().newInstance(), but as you suggest it
would be great to leave the creation up to a DI container (I use Guice
myself).
As Scott suggests, this would probably be best implemented by creating
an ObjectFactory interface, with a default implementation that uses
Class.forName().newInstance(). Then people can implement their own,
for example a GuiceObjectFactory, and do something like
morphia.setObjectFactory(myObjectFactory).
Regards,
OGG