xwiki/xwiki-platform — comment on commit 0e59b3cd2101a81cf3298a5260a36c0a37d46692
File:  line 0
By mflorea:

First we must understand why adding "distinct" breaks xwql queries like the ones used in App Within Minutes. I don't have time right now to investigate, but I've seen that the "order by" clause is broken. For instance this fails:

from doc.object(AppWithinMinutes.FormFieldCategoryClass) as category order by category.priority

while this works

from doc.object(AppWithinMinutes.FormFieldCategoryClass) as category

I'm not against adding "distinct", but it should not break existing applications.