Open matt-dalton opened 7 years ago
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)
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: