BUG With nested object
See original GitHub issuehi guys,
first of all thanks for you great work. I´m having issues with the schemas with nested objects i.e.:
cosnt Project = new LinvoDB('Projet', {
name: { type: String },
creationDateTime: { type: Number },
description: { type: String, default: null },
state: { type: String, enumerable: ['new', 'errors', 'warnings', 'checked'] },
user: { name: String, email: String, password: Number }
},{});
Promise.promisifyAll(Project);
Project.saveAsync({
"name": "test",
"description": "test2"
});
is saving the model corectly: { name: "test", creationDate: "29/06/2018", description: "test2", state: "", user: { name:"", email:"", password: ""}}
but saving a new object is adding a nested schema property in user: { name: "test2", creationDate: "29/06/2018", description: "test3", state: "", user: { schema: { name:"", email:"", password: "" }, type: {}}
and adding a new object it is nesting a new schema property { name: "test3", creationDate: "29/06/2018", description: "test4", state: "", user: { schema: { schema:{ schema: { name:"", email:"", password: "" }, type:{} }, type: {} }, type: {} } }
any suggestions on how to fix it?
the bug is reproducible with the version 3.25.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
@Ivshti could you please push a new version of the module? thank you. and please let me know how to let the 4 test failing pass
@Ivshti is there anything blocking the push of the new version?