-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
test: add hasAndBelongsToMany integration test #220
Conversation
The findById issue seems to be bug. What DB do you test against? |
@raymondfeng memory db |
I have updated the find + include URL in the commit & the pr description, it should be
|
All is well |
Test Failed. To trigger a build add comment - ".test\W+please" |
* it allows to find related object via URL scope GET /api/categories/{cat-id}/products * it allows to find related objects via where filter GET /api/products?filter[where][categoryId]={cat-id} (skipped for now) * it includes requested related models in `find` GET /api/categories/findOne ?filter[where][id]=CAT-ID&filter[include]=products * it includes requested related models in `findById` GET /api/categories/{cat-id}?include=products (skipped for now)
I have reworked the tests, two of them are marked as "skip" since the functionality is not implemented yet.
@raymondfeng the patch is ready for review now. |
LGTM. |
…hasManyThrough test: add hasAndBelongsToMany integration test
All is well |
Test Failed. To trigger a build add comment - ".test\W+please" |
This pull request adds two integration tests for loopbackio/loopback-datasource-juggler#85
it allows to find related objects via id filter
GET /api/products?filter[where][categoryId]=CAT-ID
it fills related objects requested by "include" in find
GET /api/categories/findOne?filter[where][id]=CAT-ID&filter[include]=products
What is not covered yet:
it fills related objects requested by "include" in findById
GET /api/categories/CAT-ID?include=products
/to @raymondfeng please review.
/cc @ritch @pandaiolo
Related: strongloop/loopback-sdk-angular#26