spring-data-mongodb icon indicating copy to clipboard operation
spring-data-mongodb copied to clipboard

MultiDatabase Auto Index

Open Lucasark opened this issue 2 years ago • 6 comments

From this issue:

issue

Now with reproduction:

https://github.com/Lucasark/mongodb-multidata

Behavior:

image

Expected: Create index only on collection "NewDB1" of model_1, but it created on both collections

Lucasark avatar Aug 30 '23 02:08 Lucasark

Thank you for following up on that issue - we'll have a look.

christophstrobl avatar Aug 30 '23 05:08 christophstrobl

Thank you for following up on that issue - we'll have a look.

Any update?

Lucasark avatar Sep 06 '23 00:09 Lucasark

@christophstrobl any update?

Lucasark avatar Sep 29 '23 00:09 Lucasark

it's on the list - sorry it takes so long.

christophstrobl avatar Sep 29 '23 05:09 christophstrobl

it's on the list - sorry it takes so long.

Just to remember haha, :D

Lucasark avatar Oct 18 '23 03:10 Lucasark

It looks like the sample is sharing the very same MappingContext having index creation enabled for the two templates. Since the context is auto configured the entity scanning picks up all domain types from the applications base package com.example.multi_mongo_proj which contains both modelRepo1 and modelRepo2 .

christophstrobl avatar Oct 18 '23 11:10 christophstrobl