Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Enable schema management check via config for JaversMongoRepositories #1260

Closed
egasimov opened this issue Feb 2, 2023 · 6 comments
Labels

Comments

@egasimov
Copy link
Contributor

egasimov commented Feb 2, 2023

Is your feature request related to a problem? Please describe.
When using Javers in projects backend by MongoDB, javers-mongo-repository module trying to create indexes on the collection. (via calling ensureSchema()). In our projects, the app-user usually do not have such permissions(create index) on database.
These internal used collections and indexes are considered to be created by Ops team.

Describe the solution you'd like
I would like to javers-mongo-repository module having option to configure schema management like javers-sql-repository module did

Describe alternatives you've considered
An alternative to create CustomMongoSchemaManager that extends MongoSchemaManager inject it into where used in library via reflection. But it is no so good option to consider.

Additional context
There is option to configure "enable schema management" in Javers SQL Repository module (see SqlRepositoryConfiguration.java).

@mmushfiq
Copy link

mmushfiq commented Feb 2, 2023

We also faced the same situation. Let's wait response)

@egasimov
Copy link
Contributor Author

egasimov commented Feb 3, 2023

Hey @bartoszwalacik,
I have just created PR for addressing above feature and would also like to get feedback from you. Thanks!

@bartoszwalacik
Copy link
Member

thanks @egasimov , see my comment on the PR

@egasimov
Copy link
Contributor Author

egasimov commented Feb 7, 2023

@bartoszwalacik Sure. I've made few changes, Could you please re-review it again ?

Thank you for your time.

@mehdiyevcs
Copy link

Faced same issue, while integrating. Would appreciate having ability to control behavior via config file

@bartoszwalacik
Copy link
Member

bartoszwalacik commented Feb 17, 2023

done, released in 6.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants