We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Thanks for this library!
I might have missed something, but is it possible to load nested relations (as you would in bookshelf)?
e.g. /users?load=things,things.morethings,things.moreThings.moreNestedThings
/users?load=things,things.morethings,things.moreThings.moreNestedThings
Doing so for me errors in the getWithRelatedArray function:
getWithRelatedArray
TypeError: Cannot read property 'before' of undefined <br> at Builder.relObj.(anonymous function) (/Users/me/projects/talisker/node_modules/kalamata/src/index.js:432:38) <br> at selectConstraints (/Users/me/projects/talisker/node_modules/bookshelf/lib/relation.js:247:46) <br> at Sync.<anonymous> (/Users/me/projects/talisker/node_modules/bookshelf/lib/sync.js:161:21) <br> at PassThroughHandlerContext.finallyHandler (/Users/me/projects/talisker/node_modules/bluebird/js/release/finally.js:57:23) <br> at PassThroughHandlerContext.tryCatcher (/Users/me/projects/talisker/node_modules/bluebird/js/release/util.js:16:23) <br> at Promise._settlePromiseFromHandler (/Users/me/projects/talisker/node_modules/bluebird/js/release/promise.js:512:31) <br> at Promise._settlePromise (/Users/me/projects/talisker/node_modules/bluebird/js/release/promise.js:569:18) <br> at Promise._settlePromise0 (/Users/me/projects/talisker/node_modules/bluebird/js/release/promise.js:614:10)
The text was updated successfully, but these errors were encountered:
Hey @matt-dalton , I also got this error today.
The way I patched it was to wrap the runHooks method in an if statement to check that it actually exists.
Before:
relObj[r] = function(qb) { runHooks(relHooks.before.getRelated, [req, res, qb]); };
After:
relObj[r] = function(qb) { if(relHooks){ runHooks(relHooks.before.getRelated, [req, res, qb]); } };
(but I don't know what effect this has on the code - there might be a more serious underlying issue)
Sorry, something went wrong.
No branches or pull requests
Thanks for this library!
I might have missed something, but is it possible to load nested relations (as you would in bookshelf)?
e.g.
/users?load=things,things.morethings,things.moreThings.moreNestedThings
Doing so for me errors in the
getWithRelatedArray
function:The text was updated successfully, but these errors were encountered: