From 1bd3b2e40af7a3bf13eb82a075b0b6e61da38d3e Mon Sep 17 00:00:00 2001 From: harv Date: Mon, 2 Nov 2015 14:38:58 -0800 Subject: [PATCH] added clearer error message when going many to many join when used without sails --- lib/waterline-schema/joinTables.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/waterline-schema/joinTables.js b/lib/waterline-schema/joinTables.js index f2b557c..bcd31d0 100644 --- a/lib/waterline-schema/joinTables.js +++ b/lib/waterline-schema/joinTables.js @@ -203,7 +203,8 @@ JoinTables.prototype.buildTable = function(columns) { if(!table.connection) { var err = "A 'dominant' property was not supplied for the two collections in a many-to-many relationship. " + "One side of the relationship between '" + c1.collection + "' and '" + c2.collection + "' needs a " + - "'dominant: true' flag set so a join table can be created on the correct connection."; + "'dominant: true' flag set so a join table can be created on the correct connection " + + "and ensure that both models explicity have the connection set."; throw new Error(err); }