[WIP]Expose replace methods for related models - #1616
Conversation
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
bajtos
left a comment
There was a problem hiding this comment.
LGTM.
@strongloop/sq-lb-apex can I get another pair of eyes to review these changes please and merge the pull request if all looks good?
|
@slnode ok to test |
|
@bajtos : Thank you for your review. I think we should wait with merging this PR. Like I noted in strongloop/loopback#3959, I've implemented changes just for |
jannyHou
left a comment
There was a problem hiding this comment.
@ivanschwarz Thank you for working on exposing the PUT method for relations!
Your code change looks reasonable to me 👍
Just some linting errors, you can also check them by running npm run lint on local:
09:22:47 > eslint .
09:22:47
09:23:13
09:23:13 /home/jenkins/workspace/nb/loopback-datasource-juggler~master/7a48ad0e/test/model-inheritance.test.js
09:23:13 76:1 error Expected indentation of 6 spaces but found 8 indent
09:23:13
09:23:13 ✖ 1 problem (1 error, 0 warnings)
09:23:13 1 error and 0 warnings potentially fixable with the `--fix` option.
09:23:13
|
|
||
| it('should replace scoped record with promises', function(done) { | ||
| var id; | ||
| Book.create() |
There was a problem hiding this comment.
nitpick(Not a big deal feel free to ignore): To simplify the test code I think you can omit done here.
it('should replace...', function() {
return Book.create()
.then(function(book) {
// create chapters
})
.then(function(ch) {
return verify(book);
});
function verify(book) {
return book.chapters.findById(id)
.then(function(ch) {
// verify chapter
});
}
})|
@jannyHou PTAL |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
Description
This PR is a prerequisite for strongloop/loopback#3959. You can find details there.
@bajtos : Can you review?
Related issues
Checklist
guide