From 5caeb000b00ff7833c3b3c44893d4beffc0afb82 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 3 Feb 2017 10:36:46 -0500 Subject: Fixed statement generation re negative joins without a through table Previously, a simple negative join directly to an object rather than through another table would error because the statement generator would attempt to instantiate a CTE on the field's through table, which is undefined. Now, the proper table is used regardless of whether a through table is defined. --- lib/statement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/statement.cpp b/lib/statement.cpp index 1512aa5..562eef2 100644 --- a/lib/statement.cpp +++ b/lib/statement.cpp @@ -318,7 +318,7 @@ namespace verbly { // will return zero results. Instead, we create a non-recursive // CTE that represents the subquery, then LEFT JOIN against it and // condition on the join column being NULL as before. - std::string withName = instantiateWith(clause.getField().getTable()); + std::string withName = instantiateWith(joinTableName); std::string withInstName = instantiateTable(withName); // LEFT JOIN against the CTE. -- cgit 1.4.1