1
0
Fork 0

Added an Assert when persisting an index it's objectId is not allowed to be 0

This commit is contained in:
Michael Hackstein 2017-05-02 13:17:57 +02:00
parent b6bac742b1
commit 33d9e8af9d
1 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,8 @@ void RocksDBIndex::toVelocyPack(VPackBuilder& builder, bool withFigures,
bool forPersistence) const {
Index::toVelocyPack(builder, withFigures, forPersistence);
if (forPersistence) {
// If we store it, it cannot be 0
TRI_ASSERT(_objectId != 0);
builder.add("objectId", VPackValue(std::to_string(_objectId)));
}
}