Permalink
Browse files

Update lib/databases/postgresql.js

Removing brackets which cause query to fail
  • Loading branch information...
1 parent fedb92c commit 111163b48ef3668b36858b3dbd2da20838064f5e @Gamaroff Gamaroff committed Nov 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/databases/postgresql.js
@@ -147,7 +147,7 @@ DBClient.prototype.selectRecords = function (collection, config) {
if (config.rel && config.rel.length) {
for (var i = 0; i < config.rel.length; i++) {
- query_tables = "(" + query_tables + ") JOIN " +
+ query_tables = query_tables + " JOIN " +
this._escapeId(config.rel[i].collection) + " t" + (i + 1) +
" ON " + this._escapeId("t" + i + "." + config.rel[i].rel[0]) +
" = " + this._escapeId("t" + (i + 1) + "." + config.rel[i].rel[1]);

0 comments on commit 111163b

Please sign in to comment.