Closed erichs closed 6 years ago
Save method is async, you should use a callback, try again but changing your code to the following :
inst.save((err, is_link_err, link_err_model_name) => {
console.log(`Saved model with haid ${inst.id}`);
});
You should also catch your errors in save, since it may occurs for differents reasons :
Ah! My bad. Thanks!
Hi! I'm using redis 3.2.4, nohm 0.9.8, and the following code:
This script outputs:
I can see that the keys are incrementing in Redis with multiple saved models, but the id is always
null
. Am I missing something basic here? I've tried the above with several LTS versions of node, with the same result.