Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] Creating documents fails for parent documents #514

Closed
jackstefansky opened this issue Aug 26, 2020 · 3 comments
Closed

[BUG] Creating documents fails for parent documents #514

jackstefansky opened this issue Aug 26, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@jackstefansky
Copy link

Creating parent documents does not work. In my case, I could not create a document that has a parent that was an array of embedded documents. The return

Executing POST request in postman with following json body
{ "parentDocument": "5f466be4c5505", "parentProperty": "travels", "parentPropertyType": "append", "data": { "locations": [] } }

resulted in

{ "message": "Bad structure. Invalid document structure: Unknown property \"locations\" type. Make sure to follow users collection structure", "code": 400, "version": "0.6.2" }

@eldadfux eldadfux self-assigned this Aug 26, 2020
@eldadfux eldadfux added the bug Something isn't working label Aug 26, 2020
@eldadfux
Copy link
Member

After testing on my own local env, I can confirm this is a bug. I'll post a PR with a fix later today.

@eldadfux
Copy link
Member

Seems like the parent document was validated using the collection rules of the child document. I have added a check to overwrite the rules when a parent document is being used.

@eldadfux eldadfux added the waiting for release Fixed or implemented and waiting for a new version to be released label Aug 30, 2020
@eldadfux
Copy link
Member

v0.7 is out with the fix available 🥳

@eldadfux eldadfux removed the waiting for release Fixed or implemented and waiting for a new version to be released label Feb 12, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants