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

Allow joins to nest conditional statements #690

Closed
bendrucker opened this issue Feb 13, 2015 · 8 comments · Fixed by #1397
Closed

Allow joins to nest conditional statements #690

bendrucker opened this issue Feb 13, 2015 · 8 comments · Fixed by #1397

Comments

@bendrucker
Copy link
Member

Raised in #668 (comment)

This should be possible:

.leftOuterJoin('accounts', function () {
    this
      .on('users.id', 'account.user_id')
      .andOn(function () {
         this.on('users.state', '=', 'NULL');
         this.orOn('users.state', 'accounts.state');
      });
  });
@gchauvet
Copy link

👍

@danielgindi
Copy link
Contributor

It's weird that this still isn't implemented...

@tgriesser
Copy link
Member

@danielgindi feel free to send a PR or failing tests. Otherwise it's still on my todo list

@mdaparte
Copy link

thumbs up!

@hotaru355
Copy link

👍

@kof3r
Copy link

kof3r commented Dec 28, 2015

Is there a chance this will get implemented any time soon? Would help me avoid a raw query... 😄

@nkint
Copy link

nkint commented Feb 25, 2016

any news on this?

@shinux
Copy link

shinux commented Jun 11, 2018

very helpful feature 👍

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

Successfully merging a pull request may close this issue.

10 participants