fix(model): Remove ON clause from cross join
This commit is contained in:
@@ -884,17 +884,8 @@ class Model
|
|||||||
*/
|
*/
|
||||||
public static function crossJoin(
|
public static function crossJoin(
|
||||||
string $table,
|
string $table,
|
||||||
string $columnA,
|
|
||||||
string $operatorOrColumnB,
|
|
||||||
?string $columnB = null
|
|
||||||
): static {
|
): static {
|
||||||
if (is_null($columnB)) {
|
static::$querySelect['crossJoin'] .= ' CROSS JOIN ' . $table;
|
||||||
$columnB = $operatorOrColumnB;
|
|
||||||
$operatorOrColumnB = '=';
|
|
||||||
}
|
|
||||||
|
|
||||||
static::$querySelect['crossJoin'] .= ' CROSS JOIN ' . $table . ' ON ' . "$columnA$operatorOrColumnB$columnB";
|
|
||||||
|
|
||||||
return new static();
|
return new static();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user