LPS-40695

Hi Shuyang, 

/cc @laszlocsontos

I was trying to fix this issue https://issues.liferay.com/browse/LPS-40695 and I found the problem is in the query. This query was optimized by you in https://issues.liferay.com/browse/LPS-33388.

I reverted the changes of LPS-33388 because I don't understand very well the query, maybe you could find a best solution for that.

Thanks you very much,

Eudaldo.