Closed sdghchj closed 6 years ago
It needs to be configurable, otherwise it would break the compatibility.
yeah, but DateTime value's old format in MongoDB is String. When deserializing it to DataTime member in a grain state, the following line is run:
case BsonType.String:
,
not the following line:
case BsonType.DateTime:
When WriteStateAsync method is called next time after my modification, the DateTime member will be update to MongoDB date type by running the following line:
case JTokenType.Date:
That is, the old line 'case BsonType.DateTime' for deserilizing has never been run actually. So I don't think my modification breaks the compatibility, of course, expect that the old MongoDB data is also used by some other integrated systems.
Re-check please. I have made it configurable .
it's more convenient for MongoDB driver to query by date.