Closed jerolba closed 7 years ago
DID is a private field used by ToroDB and the value should not be important to the user (as he usually only use it on joins). In fact, it is not guaranteed that this value will be an increasing integer and it may be changed on a near future. In addition to that, the current implementation has been designed to be append only, so it is not easy to implement this enhancement.
Therefore, we have decided to not implement it. If this behavior is required (for example, to create prettier slides, which I think it was the case), it can be simulated by restarting ToroDB after the collection is dropped.
If you drop a collection and then insert a new document in this collection, the did of the new document is the next available did from the previous collection "instance", and is not reset to 0.