validate references to entities in select query join expression