OnTopicCMS / OnTopic-Editor-AspNetCore

ASP.NET Core version of an editor for Ignia's OnTopic CMS.
4 stars 0 forks source link

Bug: `VersionHistory` precision mixmatch? #18

Closed JeremyCaney closed 3 years ago

JeremyCaney commented 3 years ago

When attempting to rollback the version history to a recently created version, an exception is being thrown due to the version not being valid. This may be due to us previously fixing the precision mixmatch between C# and SQL. If the C# library is still compensating for the lower precision of SQL, then this could introduce this problem. Alternatively, this could be specific to how the VersionHistory is being rendered in the OnTopic Editor.

JeremyCaney commented 3 years ago

The string representation of the version, as used for the SetVersion() action, has been updated to use ToString("o"), which ensures it matches the high-precision date/time format used by both Topic.VersionHistory and the underlying SQL DATETIME2(7) columns (assuming the OnTopic Editor is running on top of a SQL database).