fix(sqlite): Correct base table for RIGHT JOIN conversion
This commit is contained in:
@@ -822,7 +822,10 @@ class Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (static::db()->getAttribute(PDO::ATTR_DRIVER_NAME) == 'sqlite') {
|
if (static::db()->getAttribute(PDO::ATTR_DRIVER_NAME) == 'sqlite') {
|
||||||
return static::leftJoin($table, $columnB, $operatorOrColumnB, $columnA);
|
$currentTable = empty(static::$querySelect['from']) ?
|
||||||
|
static::table() : static::$querySelect['from'];
|
||||||
|
static::$querySelect['from'] = $table;
|
||||||
|
return static::leftJoin($currentTable, $columnB, $operatorOrColumnB, $columnA);
|
||||||
}
|
}
|
||||||
|
|
||||||
static::$querySelect['rightJoin'] .= ' RIGHT JOIN ' . $table . ' ON ' . "$columnA$operatorOrColumnB$columnB";
|
static::$querySelect['rightJoin'] .= ' RIGHT JOIN ' . $table . ' ON ' . "$columnA$operatorOrColumnB$columnB";
|
||||||
|
|||||||
Reference in New Issue
Block a user