diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-03 10:36:46 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-03 10:36:46 -0500 |
commit | 5caeb000b00ff7833c3b3c44893d4beffc0afb82 (patch) | |
tree | f2b9279184eb8f9399fab9d7e19ee78e4412b1fa | |
parent | a2cb19c3c8e7b16475c0ddf05e7a55751176b862 (diff) | |
download | verbly-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.
-rw-r--r-- | lib/statement.cpp | 2 |
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. |