Closed jeronimo13 closed 6 years ago
Let's say I have a piece of code that saves the question and updates user property:
task .save("questions", q) .update("users", {id: user.id}, {$addToSet: {'system.askedQuestionsArray': q.id}}) .run() .then(resolve(q));
But, when I looked at Mongo I looked at 'createdAt' property in Question entity, it has String value instead of Int64
For example, this code(obviously not a transaction) saves Question entity and 'createdAt' property is Int64
q.save() .then(User.findOneAndUpdate({id: user.id}, {$addToSet: {'system.askedQuestionsArray': q.id}})) .then(resolve(q))
Additional info:
Schema:
let questionSchema = ActiveRecord.schema({ ... createdAt: {type: ActiveRecord.types.Long, default: moment.utc().valueOf()}, });
Dependecies: "mongoose": "4.13.8", "mongoose-long": "^0.1.1", "fawn": "^2.1.0"
Please, help!
upgrade your fawn version to 2.1.1. See if that helps
@e-oj worked like a charm! Marvelous!
Let's say I have a piece of code that saves the question and updates user property:
But, when I looked at Mongo I looked at 'createdAt' property in Question entity, it has String value instead of Int64
For example, this code(obviously not a transaction) saves Question entity and 'createdAt' property is Int64
Additional info:
Schema:
Dependecies: "mongoose": "4.13.8", "mongoose-long": "^0.1.1", "fawn": "^2.1.0"
Please, help!