I've been trying to use lokijs on a project.
Does Lokijs generates its own IDs? Or do we need to handle that our selves?
I've been trying to use lokijs on a project.
Does Lokijs generates its own IDs? Or do we need to handle that our selves?
Copyright © 2021 Jogjafile Inc.
LokiJS generates its own ids. Since the property "id" is a common name, to avoid clashes the unique id of an object inserted in a collection is stored in the property
$loki
. The other loki-generated data is themeta
object containing information about the object creation and last update, as well as the revision number (number of times an object was modified).