From 4d55945470972a73f1b23f55fb8c6507139ab7c7 Mon Sep 17 00:00:00 2001 From: acekat Date: Mon, 23 May 2016 09:28:05 +0200 Subject: [PATCH] Missing changes relative to #fc03cf3 --- sequel/where.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sequel/where.js b/sequel/where.js index b72d19f..720ed44 100644 --- a/sequel/where.js +++ b/sequel/where.js @@ -348,11 +348,11 @@ WhereBuilder.prototype.complex = function complex(queryObject, options) { // Find the projection in the schema and make sure it's a valid key // that can be selected. var schema = self.schema[projection.table]; - if(!schema) { + if(!schema || !schema.definition) { return; } - var schemaVal = schema[projection.key]; + var schemaVal = schema.definition[projection.key]; if(!schemaVal) { return; }