correction bug de selection distinct avec limite.
it is impossible to get  a distinct with the (select X.*, (rownumber) since the row_number is distincted with the rest of the result, an so  all row will be defferent because of the rownumber...

i modified the query wrapper et distinct in another query than the row_numbered one.