summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-02-03 10:36:46 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-02-03 10:36:46 -0500
commit5caeb000b00ff7833c3b3c44893d4beffc0afb82 (patch)
treef2b9279184eb8f9399fab9d7e19ee78e4412b1fa /lib
parenta2cb19c3c8e7b16475c0ddf05e7a55751176b862 (diff)
downloadverbly-5caeb000b00ff7833c3b3c44893d4beffc0afb82.tar.gz
verbly-5caeb000b00ff7833c3b3c44893d4beffc0afb82.tar.bz2
verbly-5caeb000b00ff7833c3b3c44893d4beffc0afb82.zip
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/statement.cpp2
1 files changed, 1 insertions, 1 deletions
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 {
318 // will return zero results. Instead, we create a non-recursive 318 // will return zero results. Instead, we create a non-recursive
319 // CTE that represents the subquery, then LEFT JOIN against it and 319 // CTE that represents the subquery, then LEFT JOIN against it and
320 // condition on the join column being NULL as before. 320 // condition on the join column being NULL as before.
321 std::string withName = instantiateWith(clause.getField().getTable()); 321 std::string withName = instantiateWith(joinTableName);
322 std::string withInstName = instantiateTable(withName); 322 std::string withInstName = instantiateTable(withName);
323 323
324 // LEFT JOIN against the CTE. 324 // LEFT JOIN against the CTE.