Permalink
Browse files

Only SQL adapters support 'includes' for queries

  • Loading branch information...
mde
mde committed Mar 29, 2013
1 parent 18eee70 commit b82c3c6cbd83abc27f5420b03045f954e01f4513
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/index.js
View
@@ -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]);
};

0 comments on commit b82c3c6

Please sign in to comment.