Reputation: 843
I have 2 services. One writes data to MongoDB database and the other reads these data. I have a shared dependency that contains definitions of the database objects so they are consistent between projects. However the project that WRITES to the database for some reasons is delivered with a few weeks delay. The entity in question needs to get a new field - an int. I want the reading service code to be able to read the new entity, but also to be able to read the old entity and assign a default hardcoded value to the new field, until the new entity definition reaches the writing service and therefor the database. I am using MongoRepository class to read the data from the database. I am the owner of both projects and the dependency. So far I had 2 ideas:
What is the best way to achieve my goal? Will there be a problem with solution #2?
Upvotes: 1
Views: 17