BACKLOG-5390

Add a toString method so that we know which query is executed
when logging the object