Revert "Added association while building query."

This reverts commit 548e3d04dbcabe327673b451b0dbcfac8260772a.