Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Incorrect index creation with custom mapping converter and multiple Mongo dbs

  1. #11
    Join Date
    Jul 2012
    Posts
    7

    Default

    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.

  2. #12
    Join Date
    Apr 2006
    Location
    Dresden, Germany
    Posts
    483

    Default

    The Groovy issue [0] is fixed in Spring Data Commons. So with the latest versions in the classpath I get your Groovy code to work.

    [0] https://jira.springsource.org/browse/DATACMNS-228

  3. #13
    Join Date
    Jul 2012
    Posts
    7

    Default

    Code:
    Saving a Foo
    Saved
    Fantastic! Thanks, Oliver.

  4. #14
    Join Date
    Apr 2006
    Location
    Dresden, Germany
    Posts
    483

    Default

    Thanks for your patience!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •