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

$joinRelation doesn't work within $or queries #68

Closed
ewingrj opened this issue Oct 15, 2019 · 3 comments
Closed

$joinRelation doesn't work within $or queries #68

ewingrj opened this issue Oct 15, 2019 · 3 comments

Comments

@ewingrj
Copy link

ewingrj commented Oct 15, 2019

The join relation in the following query is ignored. I'd assume that the same is true for $and.

{
  $or:[
    { $joinRelation: 'child(exists)' },
    { success: true }
  ]
}
@dekelev
Copy link
Member

dekelev commented Oct 15, 2019

What is the raw SQL query that you're trying to run using $or & $joinRelation?

$joinRelation should be used with $eager, only in the query object's root level and without conditioning.

@ewingrj
Copy link
Author

ewingrj commented Oct 16, 2019

something like:

select * from parent join child on child.parent = parent.id where parent.success or child.id is not null```

@dekelev
Copy link
Member

dekelev commented Oct 16, 2019 via email

@dekelev dekelev closed this as completed Nov 1, 2019
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

2 participants