On the contrary, having a real data structure that represents the query you want your ORM to execute removes potential bugs!  The alternative/old method of generating SQL was a bunch of kludgy string concatenation.