Skip to content
This repository was archived by the owner on May 12, 2022. It is now read-only.

Commit a97e5d6

Browse files
author
Nik Barham
committed
Stupid Nik: ->resolve() returns [$sql, $data] not just $sql ...
1 parent e2b6a5e commit a97e5d6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Automatorm/Database/QueryBuilder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,10 @@ public function resolveJoins()
426426
$joinstring .= ' JOIN ' . $this->escapeTable($join['table']);
427427
} elseif ($join['subquery']) {
428428
$sql = $join['subquery'];
429-
if ($sql instanceof QueryBuilder) $sql = $join['subquery']->resolve();
429+
if ($sql instanceof QueryBuilder) {
430+
list ($sql, $subdata) = $join['subquery']->resolve();
431+
$this->data = array_merge($this->data, $subdata);
432+
}
430433

431434
$joinstring .= " JOIN ($sql) as {$join['alias']}";
432435
}

0 commit comments

Comments
 (0)