Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array documents don't seem to be supported by Schema #115

Open
cuuupid opened this issue Nov 10, 2020 · 0 comments
Open

Array documents don't seem to be supported by Schema #115

cuuupid opened this issue Nov 10, 2020 · 0 comments

Comments

@cuuupid
Copy link

cuuupid commented Nov 10, 2020

The following does not work:

const Test = new LinvoDB('Test', {
  tests: [ { name: String, x: Number } ]
}, {})
const t = new Test({ tests: [ { name: "test", x: 5 }] })

Because t gets saved as { tests: [] }.

The only way I was able to get this to work is to not specify the document array in the Schema, which then allows it to be initialized & searched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant