From 12c28ce3639e5c3034e16c794418b5f9ee1a3229 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Mon, 15 Jul 2013 10:38:54 -0700 Subject: [PATCH] Fix typos --- lib/dao.js | 2 +- lib/datasource.js | 2 +- lib/sql.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dao.js b/lib/dao.js index f5185f03..0b197c24 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -40,7 +40,7 @@ function DataAccessObject() { DataAccessObject._forDB = function (data) { - if(!this.schema.isRelational()) { + if(!(this.schema.isRelational && this.schema.isRelational())) { return data; } var res = {}; diff --git a/lib/datasource.js b/lib/datasource.js index 82b14178..33ab1ea7 100644 --- a/lib/datasource.js +++ b/lib/datasource.js @@ -1271,7 +1271,7 @@ DataSource.prototype.defineOperation = function (name, options, fn) { this._operations[name] = options; } -DataSource.prototype.isRational = function() { +DataSource.prototype.isRelational = function() { return this.adapter && this.adapter.relational; } diff --git a/lib/sql.js b/lib/sql.js index ffdc611b..1ed0d0eb 100644 --- a/lib/sql.js +++ b/lib/sql.js @@ -6,7 +6,7 @@ module.exports = BaseSQL; function BaseSQL() { } -BaseSQL.prototype.rational = true; +BaseSQL.prototype.relational = true; BaseSQL.prototype.query = function () { throw new Error('query method should be declared in adapter');