FIX jpfuentes2#361
Group association conditions in parentheses
make string buildup more readable
update test to match query string
Merge pull request #468 from jpfuentes2/group-assoc-conditions

Group assoc conditions