Revert "fix to_sql output on eager loaded relations"

This reverts commit a9748da24a5643f012fa747c2b6aa957ac7c4ee2.