DocumentRepository->findBy calls a new protected method contraintField t...

...o build the query

This new method allows us to just override the constraintField method instead of having to rewrite the whole method. 

I also fixed an error in the doc.
this is the bug fix, right? could you move that into a separate PR please, and add a test case that fails when not having this line?