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(
string $table,
string $columnA,
string $operatorOrColumnB,
?string $columnB = null
): static {
if (is_null($columnB)) {
$columnB = $operatorOrColumnB;
$operatorOrColumnB = '=';
}
static::$querySelect['crossJoin'] .= ' CROSS JOIN ' . $table . ' ON ' . "$columnA$operatorOrColumnB$columnB";
static::$querySelect['crossJoin'] .= ' CROSS JOIN ' . $table;
return new static();
}