relmongo icon indicating copy to clipboard operation
relmongo copied to clipboard

Enable multiple mongoTemplate support

Open kaiso opened this issue 4 years ago • 3 comments

  • Change the @EnableRelMongo annotation to have a new attribute mongoTemplateRef.
  • Change the RelMongo logic to be able to target a specifig mongoTemplate.

kaiso avatar Apr 25 '21 22:04 kaiso

Hey I guess I am getting this issue right now. I am using multiple mongo dbs in my springboot application and for that I am using custom mongo template names. So are there any workarounds for now?

kushalgupta36 avatar Jun 27 '22 15:06 kushalgupta36

Hello @kushalgupta36 can you use the version 3.5.0-RC4 which allows to specify the mongo template to target ? use the following code :

@EnableRelMongo(mongoTemplateRef = "mongoTemplate")

kaiso avatar Jun 28 '22 17:06 kaiso

Hey @kaiso, i used the version 3.5.0-RC4, it worked flawlessly. Thanks!

kushalgupta36 avatar Jun 28 '22 17:06 kushalgupta36