I can't get an attribute "ttl" to be saved on a document in a collection.
I'm not talking about the ttl attribute of the collection.
using lokijs v1.5.12
Here is a sample code for illustration :
var my_ttl = "1234";
var doc = {
ttl: (my_ttl).toString(),
another_ttl_string: (my_ttl).toString(),
another_ttl_integer: parseInt(my_ttl, 10),
};
var db = new loki("my_db.json", {autoload: true, autosave: true});
var coll = db.getCollection("documents");
coll.insert(doc);
And the result in Loki Db file is :
"data":[{
"$loki":1,
"ttl":null, // Hum ... what wrong here ??
"another_ttl_string":"1234", // So a string ; make sense
"another_ttl_integer":1234, // So an integer ; perfect
}]
So as you can see, I'm just expecting the ttl to be save in Loki document, is there any constraint on naming this attribute ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello,
I can't get an attribute "ttl" to be saved on a document in a collection. I'm not talking about the
ttl
attribute of the collection. using lokijs v1.5.12Here is a sample code for illustration :
And the result in Loki Db file is :
So as you can see, I'm just expecting the ttl to be save in Loki document, is there any constraint on naming this attribute ?
Thanks