question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG With nested object

See original GitHub issue

hi 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:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
orlandodemaurocommented, Jul 3, 2018

@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

0reactions
orlandodemaurocommented, Jul 10, 2018

@Ivshti is there anything blocking the push of the new version?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Autocomplete bug with nested objects in arrays in the 1.0.0 ...
Describe the bug When I try to autocomplete properties for a nested object inside an array I get autocomplete for the root object...
Read more >
BUG in INSERT … SELECT with nested objects
INSERT as SELECT from a nested table of objects with nested object attribute used in GROUP BY expression works correctly. GROUP BY nested...
Read more >
Bug from nested subscriptions in Angular - Stack Overflow
Your issue could be caused by a strangely-expected behavior of subscribing to the same Observable more than once. I ran into this issue...
Read more >
Why shallow copying nested state objects in React can cause ...
I have seen nasty bugs arising due to not deep copying the state object and then mutations being applied on nested properties (resulting...
Read more >
Nested components/variants bug - Figma Community Forum
For third hierarchy level there is no option to convert selected objects to component, neither past/drug one. Actually, even if I detatch nested...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found