Add RuntimeException when the query are performed