Sep 10th, 2012, 03:48 AM
Ok, I've tried it with that fix applied and I do see collections and indexes created in both dbs, which is fine for all practical purposes.
Perhaps I should give a little background on what I'm doing. My "real" application uses a CQRS architecture and so I'm saving command-side collections in one db and query projections in another. Only objects on the command side use custom mappers.
In my example app, this corresponds to the query repositories being registered to mongo1 and the mapping converter being registered to mongo2: no Foos will ever be persisted in mongo2. So my expectation is to see no foo collection in mongo2 at all. A more representative example would have Bar beans being mapped and persisted in mongo2.
I hope this makes what I'm doing clearer.