I have a database that uses a UniqueIndex. Deleting an object with a unique index works as expected until I defragment the database.
After I defragment the database, I get the error:
Error:273:Index BTree Validation error: Error while deleting key='[unique index value]' value='[ID]'
with the inner exception:
Unable to cast object of type '[stored type]' to type 'NDatabase.Btree.IBTreeNode'.
The attached LinqPad file demonstrates the error (you'll need to change the reference to NDatabase.dll)