-
-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
Description
FilterEagerLoadingExtension does not handle ORDER BY
a HIDDEN
field properly.
Before:
SELECT o, CASE WHEN o.dateCreated IS NULL THEN 0 ELSE 1 END AS HIDDEN _o_dateCreated_null_rank
FROM AppBundle\Entity\Tour o
INNER JOIN o.offers offers_a1
INNER JOIN offers_a1.seller seller_a2
WHERE seller_a2.id = :seller_p1 AND o.privacy IN (:privacy_p2)
ORDER BY _o_dateCreated_null_rank DESC, o.dateCreated DESC
After:
SELECT o, CASE WHEN o.dateCreated IS NULL THEN 0 ELSE 1 END AS HIDDEN _o_dateCreated_null_rank
FROM AppBundle\Entity\Tour o
INNER JOIN o.offers offers_a1
INNER JOIN offers_a1.seller seller_a2
WHERE o IN(
SELECT o_2
FROM AppBundle\Entity\Tour o_2
INNER JOIN o_2.offers offers_a1_a3
INNER JOIN offers_a1_a3.seller seller_a2_a4
WHERE seller_a2_a4.id = :seller_p1
AND o_2.privacy IN (:privacy_p2)
ORDER BY _o_dateCreated_null_rank DESC, o.dateCreated DESC
)
ORDER BY _o_dateCreated_null_rank DESC, o.dateCreated DESC