From 1cdb431ae2125da45000fbd0bd69ecec19afcf84 Mon Sep 17 00:00:00 2001 From: loay Date: Wed, 12 Apr 2017 21:35:01 -0400 Subject: [PATCH] Fix relations test case --- test/relations.test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/relations.test.js b/test/relations.test.js index b0f71f90..ec8ee815 100644 --- a/test/relations.test.js +++ b/test/relations.test.js @@ -4987,7 +4987,10 @@ describe('relations', function() { Category.findById(category.id, function(err, cat) { if (err) return done(err); var link = cat.items.at(0); - link.updateAttributes({notes: 'Updated notes...'}, function(err, link) { + // use 'updateById' instead as a replacement as it is one of the embedsMany methods, + // that works with all connectors. `updateAttributes` does not recognize the query done on + // the Category Model, resulting with an error in three connectors: mssql, oracle, postgresql + cat.items.updateById(link.id, {notes: 'Updated notes...'}, function(err, link) { if (err) return done(err); link.notes.should.equal('Updated notes...'); done();