3

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?

Anthon
  • 69,918
  • 32
  • 186
  • 246
Pedro Luz
  • 2,694
  • 4
  • 44
  • 54

1 Answers1

4

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 the meta object containing information about the object creation and last update, as well as the revision number (number of times an object was modified).

Joe Minichino
  • 2,793
  • 20
  • 20