Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only SQL adapters support 'includes' for queries

  • Loading branch information...
commit b82c3c6cbd83abc27f5420b03045f954e01f4513 1 parent 18eee70
mde authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/index.js
View
7 lib/index.js
@@ -489,6 +489,13 @@ utils.mixin(model, new (function () {
if (!adapt) {
throw new Error('Adapter not found for ' + name);
}
+ else {
+ if (opts.includes && adapt.name != 'postgres') {
+ throw new Error('Only SQL adapters support ' +
+ 'the "includes" option for queries.');
+ }
+ }
+
return adapt.load.apply(adapt, [query, callback]);
};
Please sign in to comment.
Something went wrong with that request. Please try again.