fix(model): Remove ON clause from cross join

This commit is contained in:
kj
2025-10-27 10:24:25 -03:00
parent 4c57770b43
commit b2672ad92f

View File

@@ -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();
} }