Hi,
Using the current model below, There is a discrepancy in the result for the dob field between .save() and .find() method.
const perry = new User({
id: "a1",
firstName: "Perry",
lastName: "Mason",
dob: new Date(),
});
const result = await perry.save();
console.log(result);
// Saved result
_Model {
id: 'a1',
firstName: 'Perry',
lastName: 'Mason',
dob: 2020-09-21T07:20:39.867Z,
_type: 'User',
_scope: '_default'
}
const result = await findById('a1');
console.log(result);
// Find result
_Model {
id: 'a1',
firstName: 'Perry',
lastName: 'Mason',
dob: '2020-09-21T07:29:43.111Z',
_type: 'User',
_scope: '_default'
}
May i know if it is possible to change the result of the dob for the .find() to return a Date object instead of a date String.