Get document with current version
Hello,
Very nice library. I have a question how to get only documents with current version? So we can have two documents
Cars: [
{"Name": "Audi", "Version": "1.0.0"},
{"Name": "VW", "Version": "2.0.0"}
]
Current version of model is "2.0.0".
[RuntimeVersion("2.0.0")]
public class Car
....
Will be great to use:
mongoCollection.FindAsync(_ => true);
and get only one 'VW' car in case when migration is not defined. I have use case when I have service on many instances and migration cannot be done in one step. First all services instances need to be upgraded and next we can migrate documents. In that situation I have two deployments: first to create new documents with new version and upgrade all services in some time and second migrate old documents.
Do I miss something? Can be this topic on the focus in development?
Hey @hsd99,
I am not sure if I totaly understand the use case.
This library has its focus on migration documents. It will not be able to filter them for you, but it will migrate them. So if you want to work with different version, then you should handle the case your self.
Let me know if you have any further questions. This issue will stay open the next two weeks.
Cheers, Sean