Enhancement/populate method - #137 #250
Merged
+501
−433
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR to finish the development of #137. (Adding support for populate method)
1st of all I'm sorry for pushing this all from this branch, but I felt we need to separate test schemas from the actual test file.
So, by that I've moved the schemas to
fixtures/Cats.js
and did change all the references to use this new source of it.This PR implements:
1 - New fixtures folder structure.
2 - The support for
ref
param at a schema attribute.3 - New usage of
cat.populate({ path: 'parent' })
orcat.populate('parent')
.4 - A few tests to cover that new implementation.
That's some sort of initial proposal with obvious enhancements to be done for example at the validation and the tests.
But I feel like that's enough to be added to the project so other devs can help us to enhance that feature. =)