Closed martingg88 closed 9 years ago
I have tried to add “query” method into adapter.js.
However the closure function in “query” method passing invalid arguments to another function. I guess this issue is causing by waterline’s adapter.js
Here is the flow .
note that key is “query”
adapter[key].apply(self, args);
query: function (connection, collection, options, values, cb) { this.connect(connectionName, function(err, db) { }); }
“cb” here is supposed to received the callback function but receive the other arguments instead (etc: collectionname);
connect: function (connectionName, cb) { return cb(); }
Which Sails.js version are you using? Have you seen issue#5?
I'm using sails.js 0.10.0-rc7. i do read about issue5. do u have any idea about what cause this issue?
Nope, haven't really used Sails.js yet.
I have tried to add “query” method into adapter.js.
However the closure function in “query” method passing invalid arguments to another function. I guess this issue is causing by waterline’s adapter.js
Here is the flow .
Step 1 (call the query method from waterline’s adapter.js
note that key is “query”
adapter[key].apply(self, args);
Step 2
query: function (connection, collection, options, values, cb) { this.connect(connectionName, function(err, db) { }); }
Step 3
“cb” here is supposed to received the callback function but receive the other arguments instead (etc: collectionname);
connect: function (connectionName, cb) { return cb(); }