Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

joinSub injects AS into the query (Oracle) #186

Open
timoteo7 opened this issue Feb 12, 2025 · 0 comments
Open

joinSub injects AS into the query (Oracle) #186

timoteo7 opened this issue Feb 12, 2025 · 0 comments

Comments

@timoteo7
Copy link

I am using Laravel 11 with the Oracle database,
version 2.4 of this package and the yajra/laravel-oci8 package,
when trying for example:

->leftJoinSub($subQueryIrp, 'irp', function ($join) {
        $join->on(DB::raw($regexp), '=', "irp.{$field}");
})

without using the trait
(use Awobaz\Compoships\Compoships;)

the generated SQL is correct for Oracle:
... LEFT JOIN (select ... ) IRP on ...

when I add the trait,
the generated SQL is incorrect for Oracle:

... LEFT JOIN (select ... ) as IRP on ...

because it injects the "AS",
returning a failure message:
ORA-02000: missing ON or USING keyword,

how could I override this injection of the "AS" and use the trait?

There was already a similar situation but it was registered as an issue in another project
yajra/laravel-oci8#718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant