added test for issue with query involving multiple entities on server