Closed dnish closed 4 years ago
Hey, I'm trying to update a value of an Astronomy sub class. Given is the following example:
File: { _id: String, name: String locationData: LocationObject } LocationObject: { url: String, serverId: String }
In my case, I'm doing the following query:
const file = File.findOne(); file.locationData.url = file.locationData.url.replace("old","new"); file.save(e => console.log(e));
The changed url isn't stored, also there is no error given (I even tried the validate method). The file.getModified() method returns an empty array.
file.getModified()
If I do change the name field, the changed name is stored, but the url still has the old value.
name
Can be closed, the problem occured because we did a "on the fly change" on the init method.
Hey, I'm trying to update a value of an Astronomy sub class. Given is the following example:
In my case, I'm doing the following query:
The changed url isn't stored, also there is no error given (I even tried the validate method). The
file.getModified()
method returns an empty array.If I do change the
name
field, the changed name is stored, but the url still has the old value.