From 47908b5440cf873c8749d6a0ed11d14be923a546 Mon Sep 17 00:00:00 2001 From: MicCarr Date: Wed, 25 May 2016 17:13:59 +0200 Subject: [PATCH] Lower the case of linkedCollection --- lib/waterline-schema/joinTables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/waterline-schema/joinTables.js b/lib/waterline-schema/joinTables.js index d765e37..3ee166d 100644 --- a/lib/waterline-schema/joinTables.js +++ b/lib/waterline-schema/joinTables.js @@ -491,7 +491,7 @@ JoinTables.prototype.markCustomJoinTables = function(collection) { for(var attribute in attributes) { if(!hop(attributes[attribute], 'through')) continue; - var linkedCollection = attributes[attribute].through; + var linkedCollection = attributes[attribute].through.toLowerCase(); this.collections[linkedCollection].throughTable = this.collections[linkedCollection].throughTable || {}; var throughPath = collection + '.' + attribute; var linkedAttrs = this.collections[linkedCollection].attributes;