Filter By the two or more columns inside the same Relationship #634
Unanswered
ahmedsayedabdelsalam
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've this simple relationship (user) has many (posts)
and this is my posts table in DB
when i filter the users by
posts.title
andposts.is_published
here is the query
the returned result set is not correct
here is the result
which is wrong the user has two posts one
is published
but the name is not equalone
and the other one name is correct equalsone
butis not published
here is the executed query
this issue here is that 2 separate
where exists
are executed and it is correct the same user has one or more postspublished
and one ore more records with nameone
not as expected one exists clause with the the 2 conditions inside it
what i am trying to say here is there anyway or future plan for this situation ?
something like grouping the nested filter first then running one exists for each relation.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions