- edited description
MongoDatabaseStateChecker.IsDatabaseOutdated throws an exception
When i try to check my Db throughout Startup.Configure i have an deserialization exception. I fixed the bug by creation custom serializer for Version field of SpecificationItem. I’ve found you have implemented it, but i don’t see you’ve added it to BsonClassMap.
BsonClassMap.RegisterClassMap<SpecificationItem>(cm =>
{
cm.AutoMap();
cm.GetMemberMap(x => x.Ver)
.SetSerializer(new VerstionSerializer
());
});
So pls add it to readme file to help others
I used netstandard2.1
Comments (5)
-
reporter -
reporter And maybe rename
VerstionSerializer
→VersionStructSerializer, or smth like this :)
-
repo owner Nice catch it will be fixed in the closes release. Sorry for the extremely long respond.
-
repo owner Good afternoon dear Raman,I’ve spent some time on investigation but this issue isn’t reproducible. Several unit test have been added to cover this case. You can check commit
b05dcf2
to see how you can use methodsIsDatabaseOutdated
orThrowIfDatabaseOutdated
. By the way a custom serialiser for version struct is registering in MigrationEngine class which is used under the hood of staticMongoDatabaseStateChecker
Please don’t histate to contact me in case of any difficulties.
Best regards,
Artur
-
repo owner - changed status to resolved
Can't reproduce. Covered by unit tests.
- Log in to comment